11

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?

p u
  • 1,395
  • 1
  • 17
  • 30
Raja
  • 3,477
  • 12
  • 47
  • 89
  • 2
    you can use libraries like auth0 that will do this for you, if it interests you I will write out proper implementation – Smokey Dawson Sep 07 '18 at 01:00
  • 1
    [SO post](https://stackoverflow.com/questions/36590302/auth0-angular-2-sso-single-sign-on), [auth0 tutorial](https://auth0.com/blog/angular-2-authentication/), [the github page for tutorial](https://github.com/auth0-blog/angular-2-authentication-tutorial) – Kalnode Sep 07 '18 at 01:05
  • 1
    [this](https://github.com/damienbod/angular-auth-oidc-client) library handles all for you in angular app, if you want to see an example check [this](https://github.com/DooMachine/MicroStarter) – Okan Aslankan Sep 07 '18 at 11:28
  • Thanks for your reply. I have been working for Comcast and they have their own SSO with (Client id and Call back URL). So i don't know what to go with Auth0. Do you guys know any library in node package for Angular that handles for SSO?. Because i have checked Auth0, they have their own package like '"auth0-js": "^9.4.1" for Angular,' And i think, it work only with Auth0 client id and all. But in my case, it will be different. – Raja Sep 07 '18 at 14:44
  • I think this might help you https://auth0.com/blog/angular-2-authentication/ – Jayampathy Wijesena Sep 10 '18 at 02:22
  • Hello, I used keycloak, this have a javascript adapter. Here an example: https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-angular2. – Gaalvarez Sep 10 '18 at 03:02
  • Refer to this: https://stackoverflow.com/a/54011649/1235935 – Saptarshi Basu Mar 11 '19 at 16:09
  • you can use iodc library => https://github.com/damienbod/angular-auth-oidc-client to make a SSO authentication :) – AHmedRef Mar 11 '19 at 15:57

1 Answers1

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 ... )

Huy Nguyen
  • 1,931
  • 1
  • 11
  • 11