flask-saml2
flask-saml2 copied to clipboard
Make the relay_state optional in the response.
If relay_state
isn't part of the outgoing request, it won't come back as a response. In that case, the code wouldn't work.
I have renamed the relay_state
to its semantic meaning redirect_to
, and adjusted the code so that it conforms with the method's comments.
This behavior occurs when SERVER_NAME
is not specified in the configuration, which also affects get_login_return_url
though - in that case, no URL will pass the is_valid_redirect_url
validation, as the code calls make_absolute_url
which needs the server name set to work properly.