-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(guide): integrate better auth #4305
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
docs/start/framework/react/integrate-better-auth.md
View your CI Pipeline Execution ↗ for commit 3e58dec.
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-config
@tanstack/react-start-plugin
@tanstack/react-start-router-manifest
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-config
@tanstack/solid-start-plugin
@tanstack/solid-start-router-manifest
@tanstack/solid-start-server
@tanstack/start
@tanstack/start-api-routes
@tanstack/start-client-core
@tanstack/start-config
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-handler
@tanstack/start-server-functions-server
@tanstack/start-server-functions-ssr
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
docs/start/framework/react/integrate-better-auth.md
@nrjdalal can you check the above issue as well? The above example does not work for |
Supporting the better-auth cli in Start https://www.better-auth.com/docs/concepts/cli#init would be really cool if you want to work on that. |
|
||
import { auth } from '@/lib/auth' | ||
|
||
export const ServerRoute = createServerFileRoute().methods({ |
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.
The createServerFileRoute
function should have the server route path in it
export const ServerRoute = createServerFileRoute().methods({ | |
export const ServerRoute = createServerFileRoute('/api/auth/$').methods({ |
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.
should be before, not in alpha I guess
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.
Currently this is how server routes (previously api routes) are defined. I don't know why the docs page for server routes does not have this but it acts the same way like normal routes as it updates the routeTree file
Maybe show a /protected route |
http://localhost:3000/dashboard is protected route only, step 7 |
Uh oh!
There was an error while loading. Please reload this page.