mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2026-02-02 17:35:10 +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",
|
"name": "@dopry/svelte-oidc",
|
||||||
"version": "0.2.1",
|
"version": "0.3.0",
|
||||||
"repository": "https://github.com/dopry/svelte-oidc",
|
"repository": "https://github.com/dopry/svelte-oidc",
|
||||||
"description": "Svelte OIDC Component Library",
|
"description": "Svelte OIDC Component Library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,10 @@
|
||||||
// Not all browsers support this, please program defensively!
|
// Not all browsers support this, please program defensively!
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
if (!params.has('error') && !params.has('code') && !$isAuthenticated) {
|
||||||
|
refreshToken();
|
||||||
|
}
|
||||||
|
|
||||||
async function handleOnMount() {
|
async function handleOnMount() {
|
||||||
// on run onMount after oidc
|
// on run onMount after oidc
|
||||||
const oidc = await oidcPromise;
|
const oidc = await oidcPromise;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue