Skip to content

Commit

Permalink
New attempt of solving iron-session redirect problem
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Nov 18, 2024
1 parent 1fafc22 commit a70c256
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/auth/callback/unilogin/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export interface TIntrospectionResponse extends client.IntrospectionResponse {
institutionIds: string
}

export async function GET(request: NextRequest, response: NextResponse) {
const session = await getSession({ request, response })
export async function GET(request: NextRequest) {
const session = await getSession({ request, response: NextResponse.next() })
const config = await getUniloginClientConfig()
const currentSearchParams = request.nextUrl.searchParams
const appUrl = goConfig("app.url")
Expand Down Expand Up @@ -116,5 +116,5 @@ export async function GET(request: NextRequest, response: NextResponse) {
}
// eslint-disable-next-line no-console
console.log("Debug line 118")
return Response.redirect(goConfig("app.url"))
return NextResponse.redirect(`${goConfig("app.url")}/user/profile`)
}

0 comments on commit a70c256

Please sign in to comment.