Logout error. credentials_store is empty collection

Hi,

I’m running into a logout error on my flask webserver running on Linux.
When calling OIDC.credentials_store at the logout route there is no data contained within:

OAuth2Credentials.from_json(OIDC.credentials_store[info.get(‘sub’)])

Sometimes if I reboot the server it works for the whole login/logout process. Other times not.
Are these credentials stored as cookies somewhere on the linux server? Is there a way to clear them if this happens again?

Sometimes clearing the cookies/cache on the browser seems to help.
How are these credentials stored? Is there a better way to bind these credentials to the session so they don’t get lost?

I’m not sure if I’m asking the right questions so let me know if anything needs clarifying.

Thanks!

@BirdThunderford Hi, I suggest you can take a look the discussion here for the logout issue. You can use it as an example.

I’m following that exact page and getting a key error.

OAuth2Credentials.from_json(oidc.credentials_store[info.get(“sub”)]).token_response[“id_token”]
KeyError: ‘00u1xqukpgDYBGTTz5d7’

If I try to print out oidc.credentials_store[info.get(“sub”)] directly for debugging I just get {}.

2 Likes

Ever figure this out? I am running into the same issue when using EKS.

1 Like

Also receiving the same error any update?

I never did resolve it. I switched to using Django instead of Flask.

@Lijia is there anything other commands we can try to get the token?