Skip to content

Using nuxt-auth-sanctum with apps in Docker containers #256

Answered by manchenkoff
den15dev asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @den15dev!

Since cookie authentication for SSR requires to be configured for the same domain, you should keep your CSR and SSR environment as close as possible from the backend URL and config perspective. The easiest solution which I also use for my projects is to set Laravel container name as domain, e.g. laravel.test which will make it accessible from web browser and Nuxt container, even though it is a domain name.

You can check an example here - Breeze API Docker container.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@den15dev
Comment options

Answer selected by manchenkoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants