arnavsurve / taskman

Taskman monorepo
1 stars 0 forks source link

OAuth2 sign in #18

Closed arnavsurve closed 2 months ago

arnavsurve commented 2 months ago
  1. Store Basic User Information:
    • When a user authenticates via GitHub, GitHub will provide you with a set of user information, including their GitHub username, GitHub ID, email (if accessible), and other details.
    • You should create a new user record in your database (or update an existing one) with this information.
    • At a minimum, store the following:
      • GitHub ID: A unique identifier for the user across all of GitHub.
      • Username: The user's GitHub username.
      • Email: The user's email address (if accessible).
      • OAuth Token: The OAuth token provided by GitHub for making authenticated API requests on behalf of the user.
  2. User Lookup:
    • When a user logs in via GitHub in the future, use their GitHub ID to look up their existing record in your database.
    • If the user exists, log them in; if not, create a new record.
  3. Handling Additional Information:
    • If your application requires more information than what GitHub provides, you might prompt the user to enter those details after their initial login.
    • For example, you might ask for a preferred workspace or additional settings specific to your application.
  4. Authorization and Roles:
    • Depending on your application’s needs, you might also want to assign roles or permissions to users. This can be stored alongside the user record in your database.
linear[bot] commented 2 months ago

TAS-38 OAuth 2.0 sign in