Background Information
I'm working on an application that supports users from various companies. Since some companies have their own IDP, I have SimpleSAMLphp setup as an SP. and I have configured multiple IDPs in authsources.php.
I am currently supporting SP-Initiated logins, and set the ReturnTo to a script on my server which does some processing. Let's call it receiver.php. So after the user logs into their IDP, they are bumped to this script, and only then, into my application.
What I Want To Add
I want to support IDP initiated logins, as well. In my SP's configuration, I have set RelayState in authsources.php which points to receiver.php, and things work as expected when using a test IDP (using SimpleSAMLphp).
My Question
Is it common for the SP to set the RelayState, or should this be set on the IDP? I'm a bit confused because some of the companies are asking what they should set the RelayState to, but I'm wondering if this is necessary if I can set it in my SP's configuration? They are not using SimpleSAMLphp
Perhaps it doesn't matter who sets the RelayState? Or maybe it depends on the SAML implementation (SimpleSAML, PingIdentity, etc.)?
Any insight on this is greatly appreciated.