Single sign-on in two application

HI Team,

I have created an application using our Adonis framework, it is running smoothly, now I have a requirement for a separate application. so I decided to go with Adonis.

I want these 2 application work in a single sign-on, means if the user login in one application it should allow access to another one without asking login and again vice versa.

Can anyone help me out on this, how it could be done?

1 Like

we can see in the google applications, if we logged in gmail, it’s takes in all other google app like Youtube, Drive etc.

@sudhiN

Are those your subdomains? hurr.example.com and durr.example.com or totally different sites?

For totally different sites you need to do something like “Sign in using Gmail”

But for same domain you can share cookies

I don’t use sessions, but I believe session cookie settings are somewhere inside config/sessions.js

@McSneaky

I’m using a different site.
I can not use “Sign in using Gmail” or any social media account to log in.
any other way to do this,.?

It is little bit more complex, but here is idea:

You can let your front-end do requests in background, so user will not see any redirects.
Haven’t done anything like this myself tho. But it should work well

1 Like

Thank You :slightly_smiling_face:

Let me go through it…