3
votes

I am using SAML authentication in my angular app which will be hosted on AWS. I am using angular code as separate project & code is written in different project. I have used Itfoxtec saml library in my webapi. In my project i am calling webapi from angular and flow is like below

  • end users visit website on http://localhost:1010
  • for the test, i call my first webapi which returns me IDP url to redirect to
  • my angular app, route the end user to respective IDP url and IDP server then redirect user to call back URL with SAML response. In my case, i tried to set my call back URL as http://localhost:1010/Auth/AssertionComponenet , which is angular component
  • My idea was to call another webapi to read the SAML response and provide all claim information

But i am getting error when IDP server redirect user to call back url which is angular URL. Error is : Cannot POST /Auth/AssertionComponenet

Any solution to this issue ? I read some post and they said angular cant read post response, so no idea on next step.

If i set call back URL as my webapi URL, will this work and even if worked, how i will be coming back to angular home page after verification of use.

1

1 Answers

1
votes

I am afraid it is not possible to pass the POST SAML 2.0 Authn Response through a frontend client lige e.g. Angular. The response need to go directly back to a server based endpoint.

This post is probably helpful: AssertionUrl for AngularJS Application