mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-11 23:50:06 +01:00
fix: silentlogin and checksession
I was forcing a redirect login result. Switch to signinCallback instead of signinRedirectCallback. signinCallbacks checks the login type varaible and calls the appropriate redirect, popup, or silent callback as necessary.
This commit is contained in:
parent
0e75316501
commit
6859dfb31b
1 changed files with 2 additions and 2 deletions
|
|
@ -76,8 +76,8 @@
|
|||
|
||||
// if code then login success
|
||||
if (params.has('code')) {
|
||||
// handle the redirect response.
|
||||
const response = await oidc.signinRedirectCallback();
|
||||
// handle the callback
|
||||
const response = await oidc.signinCallback();
|
||||
let state = (response && response.state) || {}
|
||||
// Can be smart here and redirect to original path instead of root
|
||||
const url = state && state.targetUrl ? state.targetUrl : window.location.pathname;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue