2

I have an web app 1 which would do the authentication of the user. After that I want to forward the request to another web app 2. Now web app 1 will generate some hashcode which I can authenticate in app 2 and be sure the user is authenticated. I thought of 2 approaches for this use case.

  1. App 1 will generate the hash and redirect to app 2 . This new URL for app 2 would have hash in the URL .
  2. App 1 would generate the hash and put it in the cookie. App 2 would access the same cookie and authenticate the user. But whatever I have read, I understand its very difficult to access cookie cross domain.

Could anyone please suggest which approach is better and if there is any better approach?

1 Answer 1

1

Yes, there is a better option, and it's called OAuth. It's specifically designed to support secure cross-domain authorization, and if you want more than bare authentication, there's a supporting standard called OpenID Connect that is built on top of the OAuth 2.0 framework that provides some richer standard data around users.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .