Skip to content

Commit

Permalink
Return meaningful error when user lacks mail attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary authored Oct 1, 2024
1 parent f2e276c commit ed954d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/azure-passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ passport.use(
}
}
)
return done(1)
return done(null, false, {
message: 'User needs e-mail attribute.'
})
}
const newUser = new User()
newUser.oid = profile.oid
Expand Down

0 comments on commit ed954d6

Please sign in to comment.