Retrieving session in another domain using nuxtjs and laravel sanctum

84 Views Asked by At

Good morning!

Here is the problem i'm facing: (i'm using NuxtJs and Laravel Sanctum)

I have a domain : 'testingdomain.com'

And with this main domain i have subdomains such as :

  • myfirstdomain.testingdomain.com
  • myotherdomain.testingdomain.com
  • connexion.testingdomain.com

my application work this way: i have the connexion.testingdomain.com that help my users getting redirected to the corresponding url for example:

A user '[email protected]' is registered in a company that use the url 'myotherdomain.testingdomain.com' so whenever he write his mail in the input displayed in connexion.testingdomain.com, he will be redirect to the corresponding url which for this example is -> 'myotherdomain.testingdomain.com'.

However if the user is logged in 'myotherdomain.testingdomain.com' and re-enter the 'connexion.testingdomain.com' i would like him to be redirected to the subdomain where he is authentified but i do not know how to achieve this because i can't access the $auth state from the 'myotherdomain.testingdomain.com' (he is logged so this.$auth.loggedIn is true) in 'connexion.testingdomain.com' (this.$auth.loggedIn is set to false)

Has anyone faced a similar problem and could help me ?

Thanks

0

There are 0 best solutions below