How to maintain logged in state across multiple subdomains from vue front-end (client view) to laravel backend (admin panel)?

Viewed 20

I am working on a project where my vue app is just a client-browsing site, where i am parsing contents from 2 different APIs sourced from two stand-alone apps build on laravel but other developers in the past (no contact information available). So i need to make a login system where, when a user sign-in from the front-end, his logged-in state is saved throughout the domain and sub-domains(A and B). Currently I have an auth system where the users are being given auth_token from one of the sub-domain(A) auth-system and it works perfectly as expected. However, the issue comes when the user (logged-in) clicks on one of the items in the front-end and is redirected to the sub-domain(A) from where the item was iterated, the logged-in state is lost and the users need to sign-in again to continue to cart and check-out.

So is there any methods where i can implement the logged in state between the main domain and sub-domain(A)? Lets not worry about sub-domain(B) as of now and might not even actually need that, but (A) is very essential.

0 Answers
Related