SWM2-Ukalloski-Salem / github-api

MIT License
0 stars 0 forks source link

How does the API access the Github login #6

Open basel-ui opened 1 year ago

basel-ui commented 1 year ago

As a Developer I want to login with my API access to Github so I can use our automaticly Development for creating Repositories

0xchabbi commented 1 year ago

To access a users Github acc information, the API needs to have the user´s authorization. This authorization is usually obtained through an OAuth flow, where user is redirected to GitHub to grant access to their account. The API can then use an access token to make API requests on behalf of the user.

6

A general process:

  1. The API redirects the user to Github´s authorization page
  2. the user logs in to Github and grants access to their account
  3. Github redirects the user back to the API with an authorization code
  4. API exchanges the authorization code for an access token
  5. api uses the access token to make API requests on behalf of the user

note! access-token schould be securely stored and never exposed to the client, because grant access to the users Github account