zamzterz/Flask-pyoidc

SERVER_NAME requirement

Closed this issue · 4 comments

Hi!

I've been playing around today with this great lib but I can't figure out one thing. According to the docs, SERVER_NAME must be set in order to the lib to work, but there are no further explanations.

In my case, using the latest version of flask from pip (1.1.2) and the version 3.2.0 of this iib, if I set SERVER_NAME to something then all the request that use a different hostname (for example kubernetes liveness and readiness probes, that uses the localhost / localip) get a 404 as an answer. If I don't set SERVER_NAME the app won't come up because of the hard requirement of the lib.

Is there some alternative than setting SERVER_NAME?

Thanks in advance!

Unfortunately that's a problem with Flask.

This library required the SERVER_NAME to generate the correct client redirect_uri automatically. But as of #79 there's now a separate config parameter (OIDC_REDIRECT_DOMAIN) to configure it instead.

Thank you!

I just wanted to confirm you that the latest release with the #79 patch is working for me :)

Thank again

Perfect, thanks for letting me know!