mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-11 23:50:06 +01:00
feat: add silent login on load.
This commit is contained in:
parent
356f437331
commit
27577a876a
2 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@dopry/svelte-oidc",
|
||||
"version": "0.2.1",
|
||||
"version": "0.3.0",
|
||||
"repository": "https://github.com/dopry/svelte-oidc",
|
||||
"description": "Svelte OIDC Component Library",
|
||||
"keywords": [
|
||||
|
|
|
|||
|
|
@ -118,6 +118,10 @@
|
|||
// Not all browsers support this, please program defensively!
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
if (!params.has('error') && !params.has('code') && !$isAuthenticated) {
|
||||
refreshToken();
|
||||
}
|
||||
|
||||
async function handleOnMount() {
|
||||
// on run onMount after oidc
|
||||
const oidc = await oidcPromise;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue