Skip to content

Commit

Permalink
Loads of console.logs
Browse files Browse the repository at this point in the history
And a new way of trying to redirect
  • Loading branch information
spaceo committed Nov 18, 2024
1 parent 7b281ae commit 785b8eb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/auth/callback/unilogin/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,31 @@ export async function GET(request: NextRequest) {
session.isLoggedIn = true
session.type = "unilogin"

// eslint-disable-next-line no-console
console.log("Debug line 88")

// Set token info.
setTokensOnSession(session, tokenSet)

// eslint-disable-next-line no-console
console.log("Debug line 94")

// Set user info.
session.userInfo = {
sub: userinfo.sub,
uniid: introspect.uniid,
institutionIds: introspect.institutionIds,
}

// eslint-disable-next-line no-console
console.log("Debug line 104")

await session.save()

return Response.redirect(uniloginClientSettings.post_login_route)
// eslint-disable-next-line no-console
console.log("Debug line 109")

return Response.redirect(`${goConfig("app.url")}/user/profile`)
} catch (error) {
console.error(error)
// TODO: Error page or redirect to login page.
Expand Down

0 comments on commit 785b8eb

Please sign in to comment.