Flask OIDC user login is true but token is None Flask OIDC user login is true but token is None flask flask

Flask OIDC user login is true but token is None


For future users, check to see if you are running this with just 1 thread or multiple (gunicorn or such). If you are running with multiple threads, you need to update your credentials_store with a different impl that works across threads/instances.

I used redis with a super simple implementation like so:

class RedisCredentialsStore(dict):    def __setitem__(self, sub, item):        flask.g.redis.set(sub, item)    def __getitem__(self, sub):        return flask.g.redis.get(sub)