Skip to main content

createServerSideClient()

Creates an Nhost client that runs on the server side. It will try to get the refesh token in cookies, or from the request URL If a refresh token is found, it uses it to get an up to date access token (JWT) and a user session This method resolves when the authentication status is known eventually

@returns

instance of NhostClient that is ready to use on the server side (signed in or signed out)

Parameters


params required string | Partial<Pick<NhostReactClientConstructorParams, "subdomain" | "region" | "authUrl" | "graphqlUrl" | "storageUrl" | "functionsUrl">>


context required GetServerSidePropsContext<ParsedUrlQuery, PreviewData>

Server side context