mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-11 23:50:06 +01:00
docs: update with SvelteKit instructions
This commit is contained in:
parent
5401fed671
commit
7bf19b5d59
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
|
@ -73,6 +73,18 @@ use for client side auth in an SSR application you will need to ensure it is not
|
|||
{#if process.browser} <OidcContext> ..... </OidcContext> {/if}
|
||||
```
|
||||
|
||||
## SvelteKit/SSR
|
||||
Same as what is needed for Sapper (see above section). To do this, we need to import in the `script` section:
|
||||
|
||||
```
|
||||
import { browser } from '$app/env';
|
||||
```
|
||||
|
||||
And in the `main`:
|
||||
```
|
||||
{#if browser} <OidcContext> ..... </OidcContext> {/if}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributors are Welcome. There is a lot of value in a vendor neutral OIDC component for use by the Svelte and Sapper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue