Stack Auth
GuidesSDKComponentsAPI Reference
Back to home
Platform
OverviewFAQ
Getting Started
SetupComponentsUsersProduction
Concepts
API KeysBackend IntegrationCustom User DataEmailsJWT TokensOAuth
OAuth Providers
Orgs and TeamsPermissionsStack AppTeam SelectionUser OnboardingWebhooks
Customization
Custom PagesCustom StylesDark ModeInternationalization
Page Examples
Other
Self-hostMCP SetupConvex
Stack Auth Docs

Get User or Parameter

A parameter for the getUser method.

or"return-null" | "redirect" | "throw"

What to do if the user is not signed in. Defaults to "return-null".

"return-null"

Returns null. The default.

"redirect"

Redirects the user to the signIn URL.

"throw"

Throws an error.

Stack Auth AI

Documentation assistant

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.