I have a flask app with multiple valid hostnames. They are all registered in the Entra 'valid callback' list. In the old version of this app (with identity.web), my code rendered the login form, and I could use
redirect_uri=url_for("aad_auth_response", _external=True),
and _external=True would add the correct host for the current request.
In the new version (identity.flask), I create an Auth() object during app startup and then auth.init_app(app). This is before any requests, so it can't know the hostname. The result is that some requests get redirected to the other hostname, and in the process lose their after_login information, so deep-links end up pointing at the front page of the app.
Is there a way to work around this? I really want to set redirect_uri during the login flow. Is that possible?
I have a flask app with multiple valid hostnames. They are all registered in the Entra 'valid callback' list. In the old version of this app (with identity.web), my code rendered the login form, and I could use
and
_external=Truewould add the correct host for the current request.In the new version (identity.flask), I create an
Auth()object during app startup and thenauth.init_app(app). This is before any requests, so it can't know the hostname. The result is that some requests get redirected to the other hostname, and in the process lose theirafter_logininformation, so deep-links end up pointing at the front page of the app.Is there a way to work around this? I really want to set
redirect_uriduring the login flow. Is that possible?