-
-
Notifications
You must be signed in to change notification settings - Fork 38
feat(app): switch to better-auth
#696
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
Open
onmax
wants to merge
33
commits into
main
Choose a base branch
from
feat/better-auth-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1a58d2e
feat: switch to better auth
onmax 811c140
feat(auth): add migration e2e
onmax 0dd93f6
Merge remote-tracking branch 'origin/main' into feat/better-auth-migr…
onmax a9d9ddb
fix(auth): unblock build and typecheck
onmax 0c7a19a
fix: satisfy lint + auth hook types
onmax be54d13
fix(auth): avoid ts path aliases in auth config
onmax ac8582b
fix(auth): keep invite social login
onmax 040e03a
chore(shelve): harden auth migration base
onmax 52ce948
chore(app): add migration rehearsal scripts
onmax ea37af4
fix(db): rewrite 0004 migration without do blocks
onmax fd041cb
test(migration): fail compare on missing auth fks
onmax a29034b
test(e2e): improve otp errors
onmax 5e8b0d3
fix(auth): use auth schema in hub
onmax 40806fa
fix(api): avoid db.query.user
onmax 890f79f
fix(team): hydrate member users
onmax 8c43674
test(migration): harden otp flows
onmax 869814f
chore(auth): bump nuxt better auth
onmax 853e9e7
refactor(auth): remove provider hook collision
onmax 858086e
chore(auth): unslop auth core files
onmax 9c25ee0
refactor(auth): drop user schema shim
onmax a4f88fb
docs(pr): add auth review map
onmax 21ce0f2
refactor(auth): aggressive unslop core
onmax c725b5a
chore(auth): normalize auth typings
onmax 6024571
chore(auth): fix nullable hydrate types
onmax a2ebd6a
test(auth): verify runtime checks
onmax c6e5fbd
refactor(auth): remove compat fallbacks
onmax 6a0c2b9
fix(auth): use explicit user table imports
onmax 3383eac
feat(rehearsal): add migration run scripts
onmax 08a575d
chore(app): bump better-auth pkg to @185
onmax 00523ab
refactor(auth): align guards and lint cleanup
onmax 1a6ecda
Merge remote-tracking branch 'origin/main' into feat/better-auth-migr…
onmax f227389
refactor(auth): use better-auth action composables
onmax 60a2d3a
refactor(app): reuse login router instance
onmax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { defineClientAuth } from '@onmax/nuxt-better-auth/config' | ||
| import { adminClient, emailOTPClient } from 'better-auth/client/plugins' | ||
|
|
||
| export default defineClientAuth({ | ||
| plugins: [emailOTPClient(), adminClient()], | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| export async function useLogout() { | ||
| await useUserSession().clear() | ||
| const { signOut } = useUserSession() | ||
| const defaultTeamSlug = useCookie<string | null>('defaultTeamSlug') | ||
| defaultTeamSlug.value = null | ||
| await signOut() | ||
| navigateTo('/login') | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change drops the redirect parameter when starting OAuth (
signIn.social({ provider })), so users who were sent to/login?redirect=...after hitting a protected page will no longer be returned to their original destination after social auth. The login flow still passesredirect-urlinto this component, but the prop is no longer read, which is a user-visible regression in navigation behavior.Useful? React with 👍 / 👎.