What authentication flow should I use? #24474
-
Hello, I have questions about how to implement github authentication. Basically I want to access data from github through my application, its structure will be divided into a backend service and a frontend. I believe you should retrieve the access token using the frontend service and send it to the backend service. Any suggestions on how I should do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@herlanassisThe OAuth flow needs to happen in your back-end service since it needs to communicate securely with GitHub’s API using private tokens. With the architecture you’re describing, your front-end should have a “Sign in with GitHub” button that links to some URL in your back-end service that’ll kick off the OAuth process by redirecting to GitHub. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your answer! |
Beta Was this translation helpful? Give feedback.
@herlanassisThe OAuth flow needs to happen in your back-end service since it needs to communicate securely with GitHub’s API using private tokens. With the architecture you’re describing, your front-end should have a “Sign in with GitHub” button that links to some URL in your back-end service that’ll kick off the OAuth process by redirecting to GitHub.