Skip to content

Commit

Permalink
[DOCS] Update Github OAuth guide to contain 'User-Agent' in fetch hea…
Browse files Browse the repository at this point in the history
…der (#1434)

Co-authored-by: pilcrow <[email protected]>
  • Loading branch information
kgni and pilcrowonpaper authored Feb 15, 2024
1 parent 20140cd commit c42a299
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/pages/guides/oauth/account-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const tokens = await github.validateAuthorizationCode(code);
const userResponse = await fetch("https://api.github.com/user", {
headers: {
Authorization: `Bearer ${tokens.accessToken}`
"User-Agent": "my-app", // GitHub requires a User-Agent header
}
});
const githubUser = await userResponse.json();
Expand Down

0 comments on commit c42a299

Please sign in to comment.