Use of relay state
scottlikestech opened this issue · 1 comments
Forgive my misunderstanding on saml2 relay state. Just a question, not an issue with your code.
I thought if you set the returnUrl in the relay state in the initial request to the provider, it will then redirect to an alternative url instead of coming back to the service that initiated it, namely the /AssertionConsumerService.
But having seen your code in AuthController.cs, it appears the provider will still redirect to the url specified in its own settings, which will be the service that initiated the request if set up properly and can only be 1 url, but then at least include the relay returnUrl parameter in the response that was passed to it in the first place, so you can then decide whether to redirect somewhere else after authenticating them, hence the term relay.
Is this correct? Once again, forgive my lack of understanding on saml2 relay state.
Yes, that is correct. The relay state value is send back to the RP, which can then redirect or do something else based on the relay state value.