Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firebase_auth] Getting Session expired error #217

Closed
Varun-BP opened this issue Sep 25, 2019 · 11 comments
Closed

[firebase_auth] Getting Session expired error #217

Varun-BP opened this issue Sep 25, 2019 · 11 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot impact: customer A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3) platform: android Issues / PRs which are specifically for Android. plugin: auth Stale Issue with no recent activity type: bug Something isn't working

Comments

@Varun-BP
Copy link

Varun-BP commented Sep 25, 2019

I am getting session expired error like below,

E/flutter (23252): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(ERROR_SESSION_EXPIRED, The sms code has expired. Please re-send the verification code to try again., null)
E/flutter (23252): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (23252): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (23252): <asynchronous suspension>
E/flutter (23252): #2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:344:48)
E/flutter (23252): <asynchronous suspension>
E/flutter (23252): #3      FirebaseAuth.signInWithCredential (package:firebase_auth/src/firebase_auth.dart:257:23)
E/flutter (23252): <asynchronous suspension>
E/flutter (23252): #4      _GetOtpState._signInWithPhoneNumber (package:goritzy/test2.dart:94:22)
E/flutter (23252): <asynchronous suspension>
E/flutter (23252): #5      _GetOtpState._submit (package:goritzy/test2.dart:53:7)
@iapicca
Copy link

iapicca commented Oct 21, 2019

Hi @Varun-BP
could you please provide your flutter doctor -v
and your flutter run --verbose.
Also, to better address the issue, would be helpful
if you could post a self contained app on github
or the steps to reproduce it.
Thank you

@iapicca iapicca added type: bug Something isn't working blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 21, 2019
@phong764119
Copy link

I've got the same issue, i used the example code from github and when i tried using sms Phone Authentication and added my phone number for testing(fixed verification code) it's worked. But when i tried add SHA-1 key and re-login. it did send verification code but i've got the error ERROR_SESSION_EXPIRED, i check firebase console it shows my phone number is registried, so i guess that the android is auto add verification code and authorized.
Btw the same code is working well in IOS

@iapicca
Copy link

iapicca commented Nov 20, 2019

Hi @phong764119
could you please provide your flutter doctor -v
and your flutter run --verbose.
Also, to better address the issue, would be helpful
if you could post a self contained app on github
or the steps to reproduce it.
Thank you

@iapicca iapicca added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 20, 2019
@phong764119
Copy link

phong764119 commented Dec 4, 2019

Hi @iapicca
Thanks you for response,
The code i used is exactly from Firebase example, it worked as i expected.
If i added my phone number to Phone numbers for testing in firebase console and the the default code is 123456 it's worked everytime when i try login and re-login
But when i tried to use real device and phone number (the sim card on the same device) the firebase server will send a code verification and it'll automatically certified without adding verify code and trigger event PhoneVerificationCompleted
So basically it still work, but is there any way to get verify code and auto add to the input (for user UI experience) so he/she can noted that the code is auto get from SMS

@iapicca iapicca removed the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Dec 13, 2019
@Zubi1001
Copy link

Zubi1001 commented Apr 3, 2020

Hi @iapicca
Thanks you for response,
The code i used is exactly from Firebase example, it worked as i expected.
If i added my phone number to Phone numbers for testing in firebase console and the the default code is 123456 it's worked everytime when i try login and re-login
But when i tried to use real device and phone number (the sim card on the same device) the firebase server will send a code verification and it'll automatically certified without adding verify code and trigger event PhoneVerificationCompleted
So basically it still work, but is there any way to get verify code and auto add to the input (for user UI experience) so he/she can noted that the code is auto get from SMS

actually. if the user has google play services running on his device, he won't really receive an otp and his device will auto register.

@Ehesp Ehesp changed the title Getting Session expired error [firebase_auth] Getting Session expired error Apr 20, 2020
@Ehesp
Copy link
Member

Ehesp commented Apr 20, 2020

Hi @Varun-BP please could you confirm this is still an issue on the latest Flutter & auth plugin version please? Thanks.

@Ehesp Ehesp added blocked: customer-response Waiting for customer response, e.g. more information was requested. impact: customer A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3) platform: android Issues / PRs which are specifically for Android. plugin: auth labels Apr 20, 2020
@kaumudpa
Copy link

kaumudpa commented Jun 13, 2020

I am facing the same problem on ios device.

@Varun-BP
Copy link
Author

Hi @Varun-BP please could you confirm this is still an issue on the latest Flutter & auth plugin version please? Thanks.

No, now i am not facing this problem

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Jul 30, 2020
@google-oss-bot
Copy link

Hey @Varun-BP. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@Varun-BP if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@Allviss0211
Copy link

Has anyone tried to modify the expiration time of the otp code?

@firebase firebase locked and limited conversation to collaborators Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot impact: customer A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3) platform: android Issues / PRs which are specifically for Android. plugin: auth Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants