alyapanyOriginal post
Rank 1: Thread
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.
Summary
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.