-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting authenticated user's data from oauth provider #7344
Comments
We haven't documented this well, but in the final callback after the PKCE flow, when we give you the auth token and identity ID, we also give you back whatever the OAuth provider gave us under the keys: I'll leave this ticket open while we add more guidance in the documentation for this. |
@scotttrinh is there any GitHub repo that has already done this? i'd very much appreciate it because i couldn't find one. |
We have a documentation PR that will land shortly to show how to do this. You can see it here: #7354 or wait for a bit until it lands in the guides itself. |
thank you, You point me in the right direction and i found out this is how you can achieve it with GitHub: const userDataReq = await fetch("https://api.github.com/user", {
headers: {
Authorization: `token ${tokenData.provider_token}`,
},
});
const userData = (await userDataReq.json()) as GithubUserDataRes; |
I could not find a way to get the data related to the authenticated user from the oAuth provider such as user name, email or profile picture.
The text was updated successfully, but these errors were encountered: