Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when automatically trying to reauthenticate #179

Closed
cwoolum opened this issue Sep 14, 2020 · 1 comment
Closed

Error when automatically trying to reauthenticate #179

cwoolum opened this issue Sep 14, 2020 · 1 comment

Comments

@cwoolum
Copy link

cwoolum commented Sep 14, 2020

I am trying to have my app automatically redirect after the session expires so I created a saga to handle the redux-oidc/USER_EXPIRED event.

The code is pretty simple and just looks like

export function* refreshUser() {
    yield call(userManager.signinRedirect);
}

export default function* watchAuthorizeSaga() {
    yield takeEvery(USER_EXPIRED, refreshUser);
}

This event also seems to fire though as soon as the page loads on the callback. In that secnario, when it makes the call, i get the error

io-427945dd.js?f529:111 TypeError: Cannot read property '_signinStart' of null
    at t (oidc-client.min.js?dd17:47)
    at runCallEffect (redux-saga-core.esm.js?42a9:524)
    at runEffect (redux-saga-core.esm.js?42a9:1204)
    at digestEffect (redux-saga-core.esm.js?42a9:1271)
    at next (redux-saga-core.esm.js?42a9:1161)
    at proc (redux-saga-core.esm.js?42a9:1108)
    at eval (redux-saga-core.esm.js?42a9:585)
    at immediately (redux-saga-core.esm.js?42a9:56)
    at runForkEffect (redux-saga-core.esm.js?42a9:584)
    at runEffect (redux-saga-core.esm.js?42a9:1204)

Is there a different approach I should be taking?

@cwoolum
Copy link
Author

cwoolum commented Sep 22, 2020

It seems that anytime I call the user manager methods from a Saga, this is always null in oidc-client. I'm wondering if this is a Redux issue with the use of call.

@cwoolum cwoolum closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant