opentrace-community / opentrace-cloud-functions

OpenTrace Cloud Functions. Reference implementation of the BlueTrace protocol.
https://bluetrace.io
GNU General Public License v3.0
273 stars 121 forks source link

getUploadToken 401 #52

Closed supernovahimura closed 4 years ago

supernovahimura commented 4 years ago

Hi, When I want to upload data, the following appears: Selección_002

alexissinglaire commented 4 years ago

@supernovahimura : hi, HTTP error 401 related with authentication. You can review again your service-account.json that you downloaded from firebase console.

the good service-account.json contain following components: private_key_id, private_key, auth_uri, token_uri, auth_provider_x509_cert_url, and client_x509_cert_url

good luck.

supernovahimura commented 4 years ago

Thanks!!!, I had to repeat the process, I get the following from firebase: Selección_006

Now it asks me for a pin to upload data, how do I get that PIN?

alexissinglaire commented 4 years ago

@supernovahimura : refer to below comment on how to hardcode your upload pin inside getUploadToken.ts

https://github.com/opentrace-community/opentrace-cloud-functions/issues/6#issuecomment-612867291

supernovahimura commented 4 years ago

add the following code and it shows me invalid pin, uninstall the app, but now in register your mobile number, nothing returns and nothing appears in firebase, when I select get OTP. Selección_007 Selección_008

changeimagewhats

alexissinglaire commented 4 years ago

@supernovahimura : is there any error in the android logcat ? you mean when you press 'Get OTP' there is no error shown in the firebase functions logs?

supernovahimura commented 4 years ago

These are the errors I get when debugging the app: Selección_010 Selección_011 Selección_012 Selección_013 Selección_014

When I press 'Get OTP' I get the following:

Selección_015 Selección_016

alexissinglaire commented 4 years ago

@supernovahimura : based o your logcat specificlly at the last part, it shows that your app is not authorized to firebase. There are 2 possibilities:

Good luck.

supernovahimura commented 4 years ago

thanks @alexissinglaire now it's working