'use client' import { useRouter } from 'next/navigation' import { Button_Shadcn_ } from 'ui' import { auth } from '~/lib/userAuth' export function DevSecretAuthForm() { const router = useRouter() function signInWithGitHub() { auth.signInWithOAuth({ provider: 'github', options: { redirectTo: process.env.NEXT_PUBLIC_SITE_URL, }, }) } function signOut() { auth.signOut().then(({ error }) => { if (error) { throw error } router.push('/') }) } return (
This is a dev-only route to sign in and test authenticated actions within docs. In staging and production, signin is managed via dashboard because docs and dashboard are proxied to the same domain.