-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom callback handling #37
Add custom callback handling #37
Conversation
@jfromaniello @hzalaz - Would be curious to get your feedback on this approach. We want a provide a way to do some additional validation/processing/etc on the callback route before we call the user signed in. |
If this example's going to end up in a README please adjust the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
EXAMPLES.md
Outdated
handleCallback: async function (req, res, next) { | ||
const client = req.openid.client; | ||
try { | ||
req.session.openidTokens.userinfo = await client.userinfo(req.session.openidTokens); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why storing the userInfo in the TokenSet instead of just in the session?
Description
Add the ability to do custom callback handling. Used to store/process incoming authorization artifacts or other login-time transactions. See EXAMPLES.md for how to use this option.
Testing
Checklist
master