Utpal Kumar Das
Utpal Kumar Das

Reputation: 1246

How to implement Single Sign On (SSO) in angular 2 apps with Identity server 4?

I am developing some angular 2.x based application with Identity Server 4 (in asp.net core) as authentication server. Server setup, application authentication is done but now requirement is to support SSO to avoid login in each application.

To do so I am storing authentication token in local storage and trying to reuse in different angular 2 application but it does not work.

What is the standard way to do SSO here with Identity server 4 and any types of clients with any browser?

Thanks in advance.

Upvotes: 1

Views: 3153

Answers (1)

rawel
rawel

Reputation: 3033

You should not reuse same authentication token(access token) from both apps. You need to configure two clients(implicit flow will be suitable for this) in identity server and use those clients in your angular apps(one client for each). Both apps will redirect users to same identity server log-in page. When you signed into identity server(from any app) you do not require to sign-in again from the other app.

Upvotes: 4

Related Questions