Back

GitHub OAuth login get GitHub username

  • 0
  • Users
  • Accounts
  • Web
Eddie Jaoude | EddieHub
12 Dec, 2023, 11:07

After a user logs in via GitHub OAuth, how can the app knowtheir GitHub username?

I could not see it in the session await account.getSession("current") or account await account.get()

TL;DR
The user is seeking assistance in retrieving the GitHub username after a user logs in via GitHub OAuth. It seems that the current session (`await account.getSession("current")`) only provides an access token. The user also mentions that Appwrite only retrieves the user's email and not the GitHub username directly. No solution is provided in the support thread.
D5
12 Dec, 2023, 15:43

If I'm not wrong appwrite only gets the user email, so you can't get it directly from appwrite

Drake
12 Dec, 2023, 16:04

The current session (await account.getSession("current")) will have an access token which you can use the make an API call to GitHub and probably retrieve the username

Eddie Jaoude | EddieHub
12 Dec, 2023, 16:19

Thank you @D5 @Drake πŸ‘

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more