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:
Darrel O'Pry 2020-06-04 03:21:05 -04:00
parent 0e75316501
commit 6859dfb31b

View file

@ -76,8 +76,8 @@
// if code then login success // if code then login success
if (params.has('code')) { if (params.has('code')) {
// handle the redirect response. // handle the callback
const response = await oidc.signinRedirectCallback(); const response = await oidc.signinCallback();
let state = (response && response.state) || {} let state = (response && response.state) || {}
// Can be smart here and redirect to original path instead of root // Can be smart here and redirect to original path instead of root
const url = state && state.targetUrl ? state.targetUrl : window.location.pathname; const url = state && state.targetUrl ? state.targetUrl : window.location.pathname;