Back in November 2018 I started playing with the Flask example from https://github.com/rdegges/okta-flask-example and it worked OK.
I just dusted it off again to have another look and it’s not working -
@app.before_request def before_request(): """ Load a proper user object using the user ID from the ID token. This way, the `g.user` object can be used at any point. """ if oidc.user_loggedin: g.user = okta_client.get_user(oidc.user_getfield("sub")) <<< this is throwing an exception else: g.user = okta_client.get_user(None)
okta.framework.OktaError.OktaError: Invalid token provided