opentrace-community / opentrace-android

OpenTrace Android app. Reference implementation of the BlueTrace protocol.
https://bluetrace.io
GNU General Public License v3.0
576 stars 226 forks source link

OTP is correct and the time is not expired. It still shows the code has expired #25

Open hacker-0123 opened 4 years ago

hacker-0123 commented 4 years ago
  1. Before entering the OPT the message shows "Verification failed. Please try again"

  2. Then after entering the OTP, message shows "Wrong OTP entered"

Execption I get at console- com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The sms code has expired. Please re-send the verification code to try again. -ERROR_SESSION_EXPIRED

brianssendagire commented 4 years ago

I'm having a similar problem. Did you find a solution for this?

Hoangtho11188 commented 4 years ago

As my knowledge, you should enable phone authentication on Firebase first.

Biplovkumar commented 4 years ago

Also plz Setup of cloud function then set declare type SUPPORTED_REGIONS = "us-central1" | "us-east1" | "us-east4" | "europe-west1" | "europe-west2" | "asia-east2" | "asia-northeast1"; in gradle.properties.

hacker-0123 commented 4 years ago

@Biplovkumar yeah given in the build cofig but still same. I would be grateful if you can send me your backend firebase config. Details in my mail address.

vishaljoseph commented 4 years ago

Hi, I'm having a similar issue. Were you guys able to solve it?

hacker-0123 commented 4 years ago

Just need to fix firebase function properly.

On Tue, 5 May 2020, 12:35 am VishalVincent, notifications@github.com wrote:

Hi, I'm having a similar issue. Were you guys able to solve it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opentrace-community/opentrace-android/issues/25#issuecomment-623633356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVSYGOXYU73L7GPMI3APQ3RP4DIVANCNFSM4MMDEPEQ .

vishaljoseph commented 4 years ago

I have set up cloud functions as elaborated in the README and they have even appeared on my firebase dashboard. It still doesn't seem to be working. Do I have to include any particular regions in my config.ts file? Any idea what I could have possibly missed?

hacker-0123 commented 4 years ago

Send me how it appears in your dashboard. Are u getting handshake key and temporary id

On Tue, 5 May 2020, 12:41 am VishalVincent, notifications@github.com wrote:

I have set up cloud functions as elaborated in the README and they have even appeared on my firebase dashboard. It still doesn't seem to be working. Do I have to include any particular regions in my config.ts file? Any idea what I could have possibly missed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opentrace-community/opentrace-android/issues/25#issuecomment-623636136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVSYGPLGSRBXBYLQ2THGQ3RP4D6HANCNFSM4MMDEPEQ .

vishaljoseph commented 4 years ago

The logs:

D/OnboardingActivity: NOT-IDLE signInWithCredential:success W/e.opentrace.st: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection) W/e.opentrace.st: Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (light greylist, reflection) W/e.opentrace.st: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection) D/TempIDManager: NOT-IDLE [TempID] Error getting Temporary IDs D/OnboardingActivity: NOT-IDLE Retrieved Temporary ID successfully W/Utils: NOT-IDLE get handshake pin (failure): NOT_FOUND E/OnboardingActivity: NOT-IDLE Failed to retrieve HandShakePin NOT_FOUND I/PhoneAuthProvider: Sms auto retrieval timed-out.

Dashboard:

cloudfunc

hacker-0123 commented 4 years ago

Seems fine to me, hope u have given same region in both client and server side.

On Tue, 5 May 2020, 12:50 am VishalVincent, notifications@github.com wrote:

The logs:

D/OnboardingActivity: NOT-IDLE signInWithCredential:success W/e.opentrace.st: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection) W/e.opentrace.st: Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (light greylist, reflection) W/e.opentrace.st: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection) D/TempIDManager: NOT-IDLE [TempID] Error getting Temporary IDs D/OnboardingActivity: NOT-IDLE Retrieved Temporary ID successfully W/Utils: NOT-IDLE get handshake pin (failure): NOT_FOUND E/OnboardingActivity: NOT-IDLE Failed to retrieve HandShakePin NOT_FOUND I/PhoneAuthProvider: Sms auto retrieval timed-out.

Dashboard:

[image: cloudfunc] https://user-images.githubusercontent.com/34835725/81001915-0df21a00-8e66-11ea-82d3-94b671c26eae.PNG

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opentrace-community/opentrace-android/issues/25#issuecomment-623640263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVSYGINOCTJ4NZ2IHELDYTRP4E67ANCNFSM4MMDEPEQ .

vishaljoseph commented 4 years ago

I had mistakenly put in a different region in the code and changing it seems to have solved the problem. Thanks a lot!

vishaljoseph commented 4 years ago

If I'm not wrong, the database location of my GCP Datastore should be in the same region as the above right?

alexissinglaire commented 4 years ago

If I'm not wrong, the database location of my GCP Datastore should be in the same region as the above right?

@vishaljoseph : hi, do you have any issue in the app operation? if yes, maybe you can elaborate the detail here so we can help you to find the solution.

Norbert-Mwebaze commented 3 years ago

I keep on running into this issue is there a fix to it...... Thanks

Norbert-Mwebaze commented 3 years ago

OTP comes through but i get the message "Verification failed. Please try it again"

capnmctavish commented 3 years ago

Same issue, correct otp is entered still verification fails, timeout has also not occured. But it succeeds when using the hardcoded numbers with preset OTP seamlessly

purvajg commented 3 years ago

did anyone find a fix for this?

sanjeev-kumar-vs commented 2 years ago

I am having the same issue. When user request for Otp then OTP will automatically read and trying to verifying with the firebase then it shows The sms verification code is expired and when user enter manually then it worked and user can logged in.

ahmad-alk commented 2 years ago

Same issue here ☹️☹️

ijunaidkhan commented 2 years ago

same issue with my angular app, any solution?

https://stackoverflow.com/questions/72347766/angular-firebase-phone-authentication-gives-an-error-of-wrong-otp-even-it-is-co