Skip to content

Commit

Permalink
add user email scope
Browse files Browse the repository at this point in the history
  • Loading branch information
thormengkheang committed Mar 14, 2024
1 parent 444f3bb commit 64cbe6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/login/github/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { cookies } from "next/headers";

export async function GET(): Promise<Response> {
const state = generateState();
const url = await github.createAuthorizationURL(state);
const url = await github.createAuthorizationURL(state, {
scopes: ["user:email"],
});

cookies().set("github_oauth_state", state, {
path: "/",
Expand Down

0 comments on commit 64cbe6b

Please sign in to comment.