flask-oidc
flask-oidc copied to clipboard
Expose the state
It would be useful to create state-less application to expose to the state field (or some field in it) to the client.
Note: rats is using oidc.redirect_to_auth_server(next_url) to trigger the login: https://pagure.io/rats/blob/2f271f93d35089217f14b46d45f2128e4b4864dc/f/rats/ui/ui_app.py#_78
Thanks! :)
This is fixed by 26f8f82747c0097c4f7601489b14564f6cf2ce3c.
An excerpt from an example client:
app.config.update({
....
'OVERWRITE_REDIRECT_URI': 'http://172.17.0.3:5000/custom_callback'
}
@app.route('/login')
def call_login():
return oidc.redirect_to_auth_server(None, {'foo': 'bar'})
@app.route('/custom_callback')
@oidc.custom_callback
def callback(data):
return 'Hello. The data was: %s' % data
Actually, I'll keep the issue open until I have added this into tests, documentation and a release.
Moving ahead with RATS is blocked on this feature being released, do you have it in your schedule?