Skip to main content
  • Svault automatically sends back authentication information to the frontend via the event.locals object. This allows you to display any necessary information you would like, client-side.
    • If you would like to display the users username on the page, simply load event.locals.username in your +layout.server.ts, and then call it on your +page.svelte.
    • If you would like to display an appropriate error message upon incorrect login, the error will be returned back to the client side on the event.locals.failure object.
  • See example below: