-
Notifications
You must be signed in to change notification settings - Fork 111
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
[FR] Hooks for signup/login #120
Comments
Yep! I'm noticing a pattern in requests for some kind of event bus. I think it would be a good extension point for AuthN, and could replace the webhooks that currently exist. Do you have thoughts on what shape those events take or how they can integrate with a wide variety of systems? |
In response to #112 (comment): Apologies for trying to merge this with an issue related to an event bus. Hooks are meaningfully different! I have a few points of caution here, so I'm looking to understand what new behavior they'll enable and be sure that hooks are the right way to address them. My general concerns are:
Let's lay out the endpoints that should have hooks, with a use case for each.
The app handling hooks needs to trust that they come from AuthN.
I'd aim for before the action but after the validation. |
Hi there, excellent work!
I was thinking that in the same way we can currently set a passwordless endpoint to handle the token, it would be great if we could also define endpoints that ran on signup/login/logout/other actions.
This could be done either so the response from AuthN is independent of that endpoint response, or we could make the AuthN response fail too when the endpoint response does, which would also clear the path to (potentially) adding further data to the tokens, making #10 / #111 viable, while improving AuthN flexibility/possible use cases. With this flow, AuthN would pass the token data to the endpoint, which would in turn return the modified token data to be encrypted by AuthN and sent to the client.
It could also be used for custom email validations on signup, sending emails, adding custom rules for registration, et al.
What are your thoughts?
The text was updated successfully, but these errors were encountered: