Amplify-js: Auth.SignIn() success with currentAuthenticatedUser() but currentCredentials() remains un-authenticated.

Created on 24 Oct 2019  路  4Comments  路  Source: aws-amplify/amplify-js

I am using Amplify Auth to authenticate users in a react-native application using a cognito user pool. This works fine, and currentAuthenticatedUser() returns the correct user data and valid JWT tokens for making GraphQL queries, _however_, currentCredentials() is remaining in an un-authenticated state, making it impossible to access services like S3 within my application.

According to the documentation here (under 'AWS Auth'), calling SignIn() should result in requests automatically being signed. Is this a bug or am I missing something? This is a major blocker on my current project now.

Many thanks.

* Which Category is your question related to? *
Auth
* What AWS Services are you utilizing? *
Cognito User Pools, Identity Pools

Auth Can't reproduce pending-close-response-required question

All 4 comments

bump

I am having the same issue

Hi @keithkaikai and @QuantJames, I tried reproducing the issue but I was not able to. Here are the steps I followed

1) Use WithAuthenticator HOC to handle signIn OR Auth.signIn() with userpool username and password
2) Check Auth.currentAuthenticatedUser()
3) Check Auth.currentCredentials()

In both cases (using HOC or API call) I am getting successful results for both currentAuthenticatedUser and currentCredentials.

I've tested this with aws-amplify/[email protected] and [email protected]

Will you be able to provide a sample app where we can reproduce this?

This was resolved. The issue was that Cognito was provisioned without using Amplify and used an app client secret, which is not supported by Amplify.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cgarvis picture cgarvis  路  3Comments

epicfaace picture epicfaace  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments

romainquellec picture romainquellec  路  3Comments

rygo6 picture rygo6  路  3Comments