Skip to content

Commit

Permalink
Debug login issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Oct 10, 2023
1 parent 38bfa5d commit 789a616
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server/routes/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ loginRouter.get('/', passport.authenticate('oidc'))

loginRouter.get(
'/callback',
passport.authenticate('oidc', { failureRedirect: '/error' }),
(_, res) => {
res.redirect(PUBLIC_URL)
passport.authenticate('oidc', { failureRedirect: PUBLIC_URL }),
(req, res) => {
console.log(JSON.stringify(req.user, null, 2))
res.redirect('/admin')
}
)

Expand Down

0 comments on commit 789a616

Please sign in to comment.