Thanks.
My problem is loading the client dynamiclly (as you know:) ).
So my login end point looks like this:
def login(email: String) = samlLogin(email)(parse.anyContent) { (samlClientName, loginMethod) =>
Secure(samlClientName) { profiles =>
Based on the email, I know to which tenant this email belong to, and which login method is enabled (saml, okta, office365..)
I fetch the tenant based on
m...@email.com -> then the saml client name -> call Secure with this client name -> after the authentication, I get the profiles from okta and continue with the login process.
As you can see the client fetching is dynamic, based on the user email.
So I can't set the callback controller redirect url to that url you suggested, because it is based on the user email.
So I guess I will need to expose another end point for IDP initated flow, but I don't know how to code it.
Should it be wrapped with Secure? let's say the end point is: /api/saml/idplogin.
How does this api will look like? how do I get the profiles extracted from the saml response (the profiles which I have as the result of the Secure method)
Thank you for your help!
Tomer