Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub authentication is completely broken #44

Open
jaubin opened this issue Mar 12, 2021 · 2 comments
Open

GitHub authentication is completely broken #44

jaubin opened this issue Mar 12, 2021 · 2 comments

Comments

@jaubin
Copy link

jaubin commented Mar 12, 2021

The authentication URL does not work anymore once you've got your Token.

It is no more : https://api.github.com/user?access_token=[token]

But : https://api.github.com/user with the token in the 'Authorization' header. The problem is that I could never make this work even following this documentation :

https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github

Could you please fix the code on the repo since it renders basically chapters 5, 6 and 7 useless ?

@narumolp
Copy link

narumolp commented Apr 4, 2021

I have the exact same issue as @jaubin describe. Please fix the code in this block under lib.js
const requestGithubUserAccount = (token) => {
}

@L1ghtBringer
Copy link

I have the exact same issue as @jaubin describe. Please fix the code in this block under lib.js
const requestGithubUserAccount = (token) => {
}

Must specify access token via Authorization header:

const requestGithubUserAccount = token => 
    fetch(`https://api.github.com/user`, {
        headers: {
            Authorization: `token ${token}`
        },
    }).then(res => res.json())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants