Amplify-js: RN [Auth] [API] Refresh token not working - "No current user"

Created on 25 Oct 2019  路  5Comments  路  Source: aws-amplify/amplify-js

Describe the bug
I keep getting WARN Possible Unhandled Promise Rejection (id: 3): "No current user"

 LOG  [DEBUG] 47:44.474 AuthClass - Getting current session
 LOG  [DEBUG] 47:44.571 AuthClass - Failed to get user from user pool
 LOG  [DEBUG] 47:44.581 AuthClass - Getting current session
 LOG  [DEBUG] 47:44.592 AuthClass - Failed to get user from user pool
 LOG  [DEBUG] 47:44.600 AuthClass - Failed to get the current user No current user
 LOG  [DEBUG] 47:44.614 AuthClass - Failed to get the current user No current user

calling Auth.currentAuthenticatedUser() after restarting the app returns "not authenticated"

To Reproduce

  1. Login using federatedSignin or signIn
  2. Make a query with ApolloClient
  3. Close and Reopen app
  4. No query or mutation works anymore.
  5. Log out and Login again
  6. Queries work but Mutations dont

Smartphone (please complete the following information):


    "aws-amplify": "1.2.4-unstable.5",
    "aws-amplify-react-native": "2.2.4-unstable.5",
    "aws-appsync": "^2.0.1",
    "aws-appsync-react": "^2.0.1",
    react: ^16.11.0 => 16.11.0
    react-native: ^0.61.2 => 0.61.2
Auth React Native bug

Most helpful comment

same error after upgrading @aws-amplify/auth v1.2.3.
there seems to be so many bugs in v1.2.3 in almost every packages included

All 5 comments

same error after upgrading @aws-amplify/auth v1.2.3.
there seems to be so many bugs in v1.2.3 in almost every packages included

@usmansbk, can you test your code with latest unstable release and let us know if you are still facing the issue?

@Amplifiyer This bug still persist.

am facing the same issue in the latest npm package ("aws-amplify": "1.2.4-unstable.5")

I solved it by using custom storage

Amplify.configure(aws_config);
Auth.configure({
    storage: AmplifyStorage
});
Was this page helpful?
0 / 5 - 0 ratings

Related issues

cosmosof picture cosmosof  路  3Comments

oste picture oste  路  3Comments

leantide picture leantide  路  3Comments

callmekatootie picture callmekatootie  路  3Comments

cgarvis picture cgarvis  路  3Comments