question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting user attributes from currentAuthenticatedUser() function when user signs in through Google

See original GitHub issue

Which Category is your question related to?

Auth / Cognito

Amplify CLI Version

6.0.0

What AWS Services are you utilizing?

Auth / Cognito

Provide additional details e.g. code snippets

In my app, the user can sign in using Google. I use Auth.federatedSignIn({ provider: "Google" }) to login. This works fine.

Problem is when I need to read the user’s attributes. As per the documentation, we need to use Auth.currentAuthenticatedUser() to read the user attributes. But I find that if the user signs up using google, then this function does not return attributes key in the returned object.

Question is how to read the attributes of a user that has logged in through Google.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
callmekatootiecommented, Oct 13, 2021

That did it! Thank you for your help. This issue can now be closed.

0reactions
github-actions[bot]commented, Oct 14, 2022

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrieving user information from AWS Amplify authentication
This is a guide to three methods of retrieving user information from AWS Amplify authentication: Auth.currentSession(), Auth.
Read more >
Authentication - Managing user attributes - JavaScript
Authentication. Managing user attributes. In Cognito, you have the ability to manage both standard and custom user attributes for your users.
Read more >
How to receive attributes from users who signed in via an ...
I was trying to get user attributes in a flutter project by using flutter amplify package, here is how you can access all...
Read more >
Auth.currentAuthenticatedUser() fails to recognize an ... - GitHub
Auth.currentAuthenticatedUser() fails to recognize an authenticated user that was signed using Auth.federatedSignIn({provider: 'Google'}) in a Next.js ...
Read more >
Manage Users in Firebase - Google
Create a user; Get the currently signed-in user; Get a user's profile; Get a user's ... User is signed in, see docs for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found