-
Notifications
You must be signed in to change notification settings - Fork 111
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
If a user is offline and their access token expires, but their refresh token is still valid (unexpired at last sync), the isSigned function for the session should return true. Currently it returns false. #2783
Comments
Thank you for your report. Our team will take a look into the issue |
Hi @aneeshjoshi, I'll be taking a look at this issue starting today. Will keep you updated as I dig further into the auth code and the Flutter issue (thanks for linking that!) |
We've had this issue in out apps since we're using the latest versions of amplifys frequent updates, Hope this gets fixed soon 🙏 |
Hi @sami-khleaf, I'm working on a fix now. I'll update the ticket with progress as I have updates. |
I wanted to provide a quick update that the fix is being worked on here: #2830. It isn't quite ready yet, as we are still working through some edge cases that need to be properly handled. I'll update the ticket when the fix is merged and released. |
@tylerjroach thank you , any updates? |
Yes, we were still working through a few edge cases at the end of last week. We are close to being able to merge the PR in. |
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/flutter/build-a-backend/auth/accessing-credentials/
Describe the bug
If a user is offline and their access token expires, but their refresh token is still valid (unexpired at last sync), the isSigned function for the session should return true. Currently it returns false.
The behaviour should work similar to how the Amplify Flutter library resolved this in
aws-amplify/amplify-flutter#2585
to address Issue aws-amplify/amplify-flutter#2398
Alternatively, there should be a way for the api users to determine that the reason for the null access token. Currently the exception being thrown is
aws.smithy.kotlin.runtime.http.HttpException: java.net.UnknownHostException
and it's several layers deep within the error objectReproduction steps (if applicable)
Setup a user pool client to have 7 min access & id token expiry and refresh token set to 60 days
Sign in to an android app app using that user pool client
Request the auth session on app launch, observe isSignedIn as true from the session retrieved
Set your device to Airplane Mode (no wifi or cell network)
Wait 8 mins, launch the app, observe isSignedIn as false from the session retrieved
Code Snippet
// Put your code below this line.
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: