Closed mtergel closed 1 year ago
Hi @mtergel thank you for opening this issue.
Please note that I redacted the aws_appsync_apiKey
from your comment, and recommend invalidating it as it can allow anyone to access your API directly.
Regarding the Federated Sign issue can you confirm the following:
aws-amplify: ^4.3.42
?Auth.currentAuthenticatedUser()
being called in a server-side function? (getSeverSideProps()
etc)?@mtergel we've removed the previous comment and I have re-opened the issue
As for the mention on advanced flow, I assume you are referring to this? - https://docs.amplify.aws/lib/auth/advanced/q/platform/js/#google-sign-in-react
@mtergel FYI, I just tried this out with "aws-amplify": "4.3.42"
and I am able to get the user with Auth.currentAuthenticatedUser
after Auth.federatedSignIn()
as shown in the documentation you linked.
Could you share you package.json
?
yeah I missed a note in the documentation.
Note that this isn't from a Cognito User Pool so the user you get after calling this method is not a Cognito User.
So I think I've been using it the wrong way, Sorry. Umm, any idea how to get an Social Login with popup instead of redirecting with aws-amplify cognito.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
I'm following this code sample in here
The code is working, I'm getting the results from the federatedSignIn but, when I call currentAuthenticatedUser() it errors out with no current user.
But when I log the payload in Hub, signIn event there data
Or is this the intended behavior, sorry I was just wanted to use an popup for OAuth logins instead of redirects.
Expected behavior
Logged in with Cognito user after federatedSignIn.
Reproduction steps
https://docs.amplify.aws/lib/auth/advanced/q/platform/js/#google-sign-in-react
Code Snippet
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response