StackApp Constructor Options Before SSK
The options for the StackApp constructor.
tokenStoreunionrequiredWhere to store the user's session tokens. In most cases, this is "nextjs-cookie", which will store the tokens in cookies using Next.js.
"nextjs-cookie"Persists the session tokens in window.cookie in browser environments, or Next.js cookies in server environments. This is the most common choice.
"cookie"Persists the session tokens in window.cookie in browser environments. Will not read or write cookies on the server.
{ accessToken: string, refreshToken: string }Reads the initial value for the session tokens from the provided object. It expects the same format as the object returned by currentUser.getAuthJson().
Does not persist changes to the tokens.
Reads the initial value for the session tokens from headers of the request object. For more information, see the documentation for currentUser.getAuthHeaders().
Does not persist changes to the tokens.
baseUrlstringThe base URL for Stack Auth's API. Only override this if you are self-hosting Stack Auth. Defaults to https://api.stack-auth.com, unless overridden by the NEXT_PUBLIC_STACK_API_URL environment variable.
projectIdstringThe ID of the project that the app is associated with, as found on Stack Auth's dashboard. Defaults to the value of the NEXT_PUBLIC_STACK_PROJECT_ID environment variable.
publishableClientKeystringThe publishable client key of the app, as found on Stack Auth's dashboard. Defaults to the value of the NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY environment variable.