Stack Auth
WelcomeGuides
SDKComponentsAPI Reference
OverviewFAQ
Getting Started
SetupComponentsUsersProductionVite JavaScript Example
Apps
API KeysEmailsOAuthOrgs and TeamsRBAC PermissionsWebhooksPayments
Concepts
Backend IntegrationCustom User DataJWT Tokens
OAuth Providers
Stack AppTeam SelectionUser Onboarding
Customization
Custom PagesCustom StylesDark ModeInternationalization
Page Examples
Forgot PasswordPassword ResetSign-In Page ExamplesSign-Up Page Examples
Other
CLI AuthenticationSelf-hostSupabaseConvexMCP Setup
Stack Auth Docs
Page Examples

Sign-In Page Examples

Last updated Jan 12th, 2026

This page provides examples of how to create custom sign-in pages for your application using Stack Auth components and functions.

Custom page with SignIn component

app/handler/sign-in/page.tsx

You can also use useUser at the beginning of the sign-in page to check whether the user is already signed in and redirect them to another page if they are.

Other useful components

CredentialSignIn: A component that renders a complete form for signing in with email and password. It handles validation, error states, and submission automatically.

OAuthGroup: A component that displays a list of available OAuth provider sign-in buttons. The available provider list is automatically fetched from the server based on your project configuration.

OAuthButton: A component that renders a single OAuth sign-in button for a specific provider. Use this when you only want to offer specific OAuth providers.

Custom OAuth Sign In

app/handler/sign-in/page.tsx

Custom Credential Sign In

app/handler/sign-in/page.tsx

Custom Magic Link Sign In

app/handler/sign-in/page.tsx
Previous PagePassword Reset
Next PageSign-Up Page Examples

On this page

Custom page with SignIn componentOther useful componentsCustom OAuth Sign InCustom Credential Sign InCustom Magic Link Sign In

Stack Auth AI

Experimental: AI responses may not always be accurate—please verify important details.

For the most accurate information, please join our Discord or email us.

How can I help?

Ask me about Stack Auth while you browse the docs.