amazon-cognito-identity-js icon indicating copy to clipboard operation
amazon-cognito-identity-js copied to clipboard

Single sign-on multiple applications

Open marlontrapp opened this issue 8 years ago • 7 comments

I'm currently working in a SSO (single sign-on) solution for some web apps of our organization. Each app runs in a different sub-domain then, the local storage is not accessible by them all. So, I've implemented a new storage class in this SDK, using cookies. I'm aware it opens some security vulnerabilities, that have to be protected in each app, but this solution have worked for me. I'd like to know if anyone has a better ideia how to achieve that. In case there isn't a better way to do that, I'd like to know if this implementation is relevant for somebody else and can be merged in this project.

I really appreciate any feedback, thanks.

marlontrapp avatar Sep 25 '17 15:09 marlontrapp

Depending on the user experience you want, you may also want to take a look at this SDK: https://github.com/aws/amazon-cognito-auth-js it should allow you to do single sign-on across subdomains without modification.

behrooziAWS avatar Oct 06 '17 00:10 behrooziAWS

@behrooziAWS I'm also looking for this functionality. I've read through amazon-cognito-auth-js code and haven't seen how to initiate the SDK from the second subdomain. Can you point out now to initiate the SDK without a username and password. I've looked into initiating with the various result tokens, but haven't found any solution.

ptwenke avatar Oct 16 '17 18:10 ptwenke

@ptwenke Our hosted UI https://github.com/aws/amazon-cognito-auth-js it should allow you to do single sign-on across subdomains without modification. You can achieve SSO with different sub-domains across the same browser. Because browser uses cookie to store the Cognito credentials which allow you to only log in once and later get logged in automatically.

yuntuowang avatar Dec 07 '17 22:12 yuntuowang

@yuntuowang Is it already supporting translation? Thanks.

marlontrapp avatar Dec 08 '17 01:12 marlontrapp

@marlontrapp Hi, what translation?

yuntuowang avatar Dec 08 '17 01:12 yuntuowang

@yuntuowang The translation for the hosted UI.

marlontrapp avatar Dec 08 '17 01:12 marlontrapp

@marlontrapp Do you mean that hosted UI supports different languages or not? Currently, we don't. But we will update on this repo once it has been released.

yuntuowang avatar Dec 08 '17 18:12 yuntuowang