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
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.