flask-oidc icon indicating copy to clipboard operation
flask-oidc copied to clipboard

Expose the state

Open pypingou opened this issue 8 years ago • 4 comments
trafficstars

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! :)

pypingou avatar Oct 31 '17 15:10 pypingou

This is fixed by 26f8f82747c0097c4f7601489b14564f6cf2ce3c.

puiterwijk avatar Dec 08 '17 05:12 puiterwijk

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

puiterwijk avatar Dec 08 '17 05:12 puiterwijk

Actually, I'll keep the issue open until I have added this into tests, documentation and a release.

puiterwijk avatar Dec 08 '17 05:12 puiterwijk

Moving ahead with RATS is blocked on this feature being released, do you have it in your schedule?

pypingou avatar Jan 08 '18 10:01 pypingou