Skip to content

Comments

feat(auth): add authenticated redirect fallback#174

Merged
onmax merged 3 commits intomainfrom
feat/authenticated-redirect
Feb 19, 2026
Merged

feat(auth): add authenticated redirect fallback#174
onmax merged 3 commits intomainfrom
feat/authenticated-redirect

Conversation

@onmax
Copy link
Collaborator

@onmax onmax commented Feb 19, 2026

Summary

  • Add new auth.redirects.authenticated config option for post-login/sign-up default navigation.
  • Route post-auth flow in useUserSession to resolve onSuccess → query redirect → authenticated fallback, with local-path safety checks.
  • Keep middleware semantics unchanged for auth.redirects.login and auth.redirects.logout.
  • Update config serialization endpoint to expose the new field.
  • Extend tests and docs for configuration, precedence, and default no-op behavior.

Testing

  • Added coverage in test/wrap-auth-method.test.ts.
  • Added coverage in test/use-user-session.test.ts.
  • Added runtime config endpoint coverage in test/redirects-option.test.ts.

No full suite run in this commit.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nuxt-modules/better-auth/@onmax/nuxt-better-auth@174

commit: 4145ab1

@onmax onmax merged commit 06d0891 into main Feb 19, 2026
3 checks passed
@onmax onmax deleted the feat/authenticated-redirect branch February 19, 2026 08:46
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.

1 participant