-
Notifications
You must be signed in to change notification settings - Fork 147
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
Post login callbacks #8
Comments
I think using a plugin architecture is a more universal and efficient approach here. In billstack, I'm currently calling stripe at a few places:
In addition to that, there are payment specific endpoints (e.g. to subscribe to a plan, or to add credits). By going the callback route, not only would you have payment specific data in loginsrv calls, you would also need a separate service that provides the and other payment endpoints. Simply going the route of a payment plugin would be both easier in design and also faster. There could of course also be other use cases for plugin other than payments. For example, if you wanted a http endpoint, you could easily create a plugin for it. Maybe I wrote all this for nothing because "go function" already implies a plugin architecture, who knows. 😄 |
@jgillich In fact I plan to have both:
|
I may use these hooks for a "password sharing detection" plugin. After 5 or 10 logins from different IPs within a set amount of time (maybe 24h) it would mark that account as "potentially shared" and return an html page notifying the user. I may need that eventually with htpasswd. |
ok, cool, nice idea. |
Just to clarify, the ability to register custom functions (1.) is going to be implemented using plugins? We probably meant the same and just used different terminology. |
It would be great to support a configurable callback after a successful login:
The callback should be receive the following data:
A callback should be able to return a modified claim data object.
The text was updated successfully, but these errors were encountered: