hieuhani / nuxt-multi-tenancy

Nuxt Multi Tenancy Module - multi-tenancy by sub domain for Nuxt application
https://techgoda.net/
MIT License
150 stars 16 forks source link

Redirecting to a specific tenant #25

Open JiProchazka opened 1 month ago

JiProchazka commented 1 month ago

Hi,

thank you for this awesome project at first.

Is there a way how can I use navigateTo, but to a specific tenant?

Like I'm on a landing page on http://localhost:3000 and I want to navigate to a dashboard but of specific tenant, f.e. http://test.localhost:3000/dashboard

Thanks

hieuhani commented 1 month ago

Hi JiProchazka,

The easiest solution is use Javascript window.location.href = "your tenant specific url".

You can create a custom composable navigateTo for that.

Actually the browser use a hard redirects. I haven't investigated deeply about browser history push solution. Let me investigate more, if there is any better solution, I will inform you.

Thanks for using this package 💯