Skip to content
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 hooks after login / sign-in, to execute custom server code #1556

Open
Martinsos opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1993
Open

Add hooks after login / sign-in, to execute custom server code #1556

Martinsos opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1993
Assignees
Labels
auth enhancement New feature or request

Comments

@Martinsos
Copy link
Member

Be able to execute custom server actions after a successful auth

Both after signup and login would be best case scenario. I would like to redirect user to a 'setup workspace' flow after registering, depending if they have created a workspace already (checking a field in DB). Currently I'm redirecting the user after page/app load using router from react-router-dom.

Related convo: https://discord.com/channels/686873244791210014/867713251479519232/1168305292098936932 .

@infomiho
Copy link
Contributor

I quite liked working with hooks in Directus, they are using eventemitter2 for that: https://github.com/infomiho/directus/blob/0230174b846c41b8030a14103a195c94e4d34e97/api/src/emitter.ts#L4

@infomiho infomiho self-assigned this Apr 18, 2024
@infomiho infomiho linked a pull request May 7, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants