Skip to content

Commit 61d0eeb

Browse files
committed
fix: fix google oauth2.0
1 parent 6cbd973 commit 61d0eeb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/app/auth/callback/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ export async function GET(request: Request) {
88

99
const code = searchParams.get('code');
1010
const state = searchParams.get('state');
11+
const iss = searchParams.get('iss');
1112

1213
if (!code || !state) {
1314
return NextResponse.redirect(new URL(PATHS.login, request.url));
1415
}
1516

1617
try {
17-
const token = await googleLogin({ code, state });
18+
const token = await googleLogin({ code, state, iss: iss ?? undefined });
1819

1920
const response = new NextResponse(
2021
`

src/modules/auth/_types/auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type GetGoogleLoginUrlResponse = {
55
export type GoogleLoginRequest = {
66
code: string;
77
state: string;
8+
iss?: string;
89
};
910

1011
export type Token = {

0 commit comments

Comments
 (0)