Next.js
Server-side Authentication State
Learn how to access and manage the user authentication state on the server-side in your SvelteKit application.
Prerequisites
Install the Corbado Node.js SDK:
Generate an API secret in the developer panel to allow the SDK to access the Corbado BackendAPI.
Example
To gain access to authentication state on the server-side we utilize the Corbdo Node.js SDK.
We might use it in a server-side action function to verify the user is authenticated and retrieve some data in this case:
actions.ts
Find more info on the Corbdo Node.js SDK in the backend integration section.
Was this page helpful?