svelte-auth Svelte Themes

Svelte Auth

A library for authorization in svelte for svelte kit

Svelte Auth

npm install @tuentyfaiv/svelte-auth

Examples

Instance context

<!-- +layout.svelte -->
<script lang="ts">
  import { authContext } from "@tuentyfaiv/svelte-auth";
  // configure auth routes and redirection url

  authContext(["/signin", "/forgot"], "/");
</script>

Protect page

<!-- +page.svelte -->
<script lang="ts">
  import { Auth } from "@tuentyfaiv/svelte-auth";
</script>

<Auth>
  <!-- ...content -->
</Auth>

Top categories

Loading Svelte Themes