-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for following the naming conventions! 🙏 |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a58d2e5b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ? `/auth/${props.provider}?redirect=${encodeURIComponent(props.redirectUrl)}` | ||
| : `/auth/${props.provider}` | ||
| window.location.href = url | ||
| signIn.social({ provider: props.provider }) |
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.
Preserve redirect target in social sign-in
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 passes redirect-url into this component, but the prop is no longer read, which is a user-visible regression in navigation behavior.
Useful? React with 👍 / 👎.
apps/shelve/server/db/migrations/postgresql/0003_better_auth.sql
Outdated
Show resolved
Hide resolved
commit: |
…ation # Conflicts: # pnpm-lock.yaml
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9d9ddb9cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import { AuthType } from '@types' | ||
| import { userSchema } from '~~/server/db/zod' | ||
|
|
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.
Keep invite social sign-in route reachable
Removing the legacy OAuth route handlers drops the /auth/{provider} entrypoints, but the invite flow still calls loginWithRedirect with window.location.href = /auth/${provider}?redirect=... in apps/shelve/app/pages/invite/[token].vue. In deployments where Better Auth only serves /api/auth/*, invited users who choose GitHub/Google from the invite screen will hit a missing route and be blocked from accepting invitations unless they switch to email login.
Useful? React with 👍 / 👎.
Auth migration to Better Auth.
@onmax/nuxt-better-auth/better-auth.main.Testing:
pnpm typecheck.Notes:
BETTER_AUTH_SECRET; production still should set it.HUB_APPLY_MIGRATIONS_DURING_BUILD=trueto enable).