'SSO Integration with Angular6 application

I am new to the Angular application. I would need to a suggestion to implement SSO Integration with Angular6 (SPA). I didn't get anything on the net for the complete tutorial.

Basically, I am a php developer and I did SSO integration with php applications. Since Angular6 is UI, I don't know how to manage the secret and redirection and other things with Angular6.

So It would be better if someone suggests me steps (or Github samples) to implement Angular6 & SSO Integration and what would be the best way to do that?



Solution 1:[1]

Here is my way to integrate with multiple sso in my applications. Currently, i already integrated sso ( jwt, kerberos, saml2, ...)

We have an angular app and rest api ...

/front-end/sso/method 
( method can be saml, jwt, kerberos )

When user visit any font-end sso url, it will be redirected to rest-api to handle sign on:

/back-end/sso/method?callback=frontend-url

So all sso requests are also handled at server...

You can control/manage it easily with (php or java ...)

If success, we will redirect user to front-end url with a token. Token can be put in header to hide from eye of user.

/front-end/sso/method?token=abc

If fail, we will redirect user with error message

/front-end/sso/method?error=Invalid....

PS: i choose this implementation because i am in favor of back end language and don't want to show many information at front-end ( like saml configuration ... )

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Huy Nguyen