A :class:~flask_oidc.model.User object is also provided on g.oidc_user, see its API documentation to discover which convenient properties are available.
However, g is never defined.
Similarly, the code snippet uses g as if it were a global, but I find no references to it.
@app.route('/alt')
def alternative():
# This uses the user instance at g.oidc_user instead
if g.oidc_user.logged_in:
return 'Welcome %s' % g.oidc_user.profile.get('email')
else
return 'Not logged in'
The README contains the following text fragment:
However,
g
is never defined.Similarly, the code snippet uses
g
as if it were a global, but I find no references to it.Where does this variable come from?