Skip to content

feat(app): switch to better-auth#696

Open
onmax wants to merge 33 commits into
mainfrom
feat/better-auth-migration
Open

feat(app): switch to better-auth#696
onmax wants to merge 33 commits into
mainfrom
feat/better-auth-migration

Conversation

@onmax

@onmax onmax commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Auth migration to Better Auth.

  • Switch Shelve app auth to @onmax/nuxt-better-auth / better-auth.
  • Add migration e2e coverage.
  • Resolve conflicts with main.

Testing:

  • Manual: tested on a real deployment by running a new DB migration and using the app as a user; migration applied and core flows worked.
  • Local: pnpm typecheck.

Notes:

  • Preview/CI builds no longer hard-require BETTER_AUTH_SECRET; production still should set it.
  • DB migrations are no longer applied during build by default (set HUB_APPLY_MIGRATIONS_DURING_BUILD=true to enable).

Review Lanes

Review this PR in this order:

  1. Auth-core runtime paths
  2. Mechanical artifacts (migrations/scripts/lockfile)
  3. Non-auth follow-up changes

Detailed map: docs/adrs/auth-migration-review-map.md

@vercel

vercel Bot commented Feb 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shelve-app Error Error Feb 23, 2026 8:06am
shelve-vault Error Error Feb 23, 2026 8:06am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
shelve-lp Skipped Skipped Feb 23, 2026 8:06am

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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 })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread apps/shelve/server/db/migrations/postgresql/0003_better_auth.sql Outdated
@pkg-pr-new

pkg-pr-new Bot commented Feb 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/HugoRCD/shelve/@shelve/cli@696

commit: 60a2d3a

@onmax onmax marked this pull request as ready for review February 7, 2026 11:17
@HugoRCD HugoRCD changed the title feat: switch to better auth feat(app): switch to better-auth Feb 7, 2026
@vercel vercel Bot temporarily deployed to Preview – shelve-lp February 7, 2026 11:26 Inactive
…ation

# Conflicts:
#	apps/shelve/package.json
#	pnpm-lock.yaml
Scope: PR #696 auth DX pass (PR files + auth neighbors).

No remaining direct signIn/client OTP calls or explicit ~/utils/auth-error imports in PR files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant