Back

Linking GitHub Access for Email Sign-in users (Auth)

  • 1
  • General
  • Auth
alyapany
12 Apr, 2024, 17:45

I'm facing a scenario where users sign in using their email on our website, but to access a core feature like creating a repository, we require a GitHub access token. I'm seeking guidance on how to seamlessly link their GitHub account after signing in via email to obtain the access token. Currently, the code I've implemented seems to override the existing session, creating a new account instead of linking with their GitHub account.

Additionally, I'm unsure whether it's necessary to save this access token in our database, considering it generates a new one every time a user logs in.

TL;DR
Developers are seeking advice on how to connect a user's GitHub account after they sign in through email to get an access token, without creating a new account each time. They're also unsure if it's crucial to save this token in the database. **Solution:** Ensure the flow for linking GitHub accounts post-email sign-in accurately maintains the user's session. Evaluate the necessity of storing access tokens in the database, as they generate new tokens at each login.
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