Skip to content

Commit

Permalink
fix redirect init
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed May 13, 2024
1 parent 76a0ab5 commit 91cb584
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/adapter-nextjs/src/oauth/utils/completeOAuthFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export const completeOAuthFlow = async ({

const oAuthTokenEndpoint = `https://${oAuthConfig.domain}/oauth2/token`;

const response = NextResponse.redirect(
new URL(redirectOnComplete, request.url),
);
const response = NextResponse.redirect(new URL(redirectOnComplete, origin));

const keyValueStorage = createKeyValueStorageFromCookieStorageAdapter(
createCookieStorageAdapterFromNextServerContext({
Expand Down

0 comments on commit 91cb584

Please sign in to comment.