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

Implement login hooks #2211

Merged
merged 14 commits into from
Aug 8, 2024
Merged

Implement login hooks #2211

merged 14 commits into from
Aug 8, 2024

Conversation

infomiho
Copy link
Contributor

@infomiho infomiho commented Jul 30, 2024

Closes #2117

What did we do here

  • Added two new auth hooks: onBeforeLogin and onAfterLogin

Left to do

  • Update e2e tests
  • Add a headless test
  • Docs

@infomiho infomiho marked this pull request as ready for review July 31, 2024 11:38
Copy link
Contributor

@sodic sodic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good. Very straightforward, you've built a nice system.

I do have some concerns I left in the comments.

Most important question though: Do we need this? Did someone ask for it?

@infomiho infomiho requested a review from sodic August 2, 2024 11:44
@infomiho
Copy link
Contributor Author

infomiho commented Aug 2, 2024

I haven't responded to

Most important question though: Do we need this? Did someone ask for it?

Yes! Couple of people on Discord. Without login hooks, you can't really get new access tokens for continued API access.

web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
web/docs/auth/auth-hooks.md Outdated Show resolved Hide resolved
@infomiho infomiho requested a review from sodic August 8, 2024 09:46
@infomiho infomiho merged commit b9c0285 into main Aug 8, 2024
6 checks passed
@infomiho infomiho deleted the miho-login-hooks branch August 8, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login hooks
2 participants