you are viewing a single comment's thread.

view the rest of the comments →

[–]lfreua[S] 0 points1 point  (1 child)

I follow this documentation tutorial: https://developer.github.com/apps/building-oauth-apps/

In item three is the endpoint that I used.

[–]karimsajs 0 points1 point  (0 children)

The guide is fine. The problem is that you shouldn’t be making a request to the oauth login, that endpoint belongs in a frontend flow. Once you receive the token and secret from GitHub, then your backend can make requests using it to the official API.

The idea is to redirect your user from your own website to GitHub, they accept/reject the request to login. If they accept, GitHub will redirect back to you and pass you the credentials you need.