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.
- App 1 will generate the hash and redirect to app 2 . This new URL for app 2 would have hash in the URL .
- 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?