I am trying to create a single front-end site which will serve many (unlimited) domains but I'm struggling to get Nuxt auth to work with the different domains that might be used.
In other projects, I have set up Nuxt auth like this:-
// Auth configuration
auth: {
plugins: [ '~/plugins/auth' ],
localStorage: false,
cookie: {
options: {
domain: '.example.com',
expires: 7,
},
},
}
so that any subdomain of example.com will use the cookie that's set when someone logs in.
But in this case, I don't know what the domain name will be.
Does anyone know how I can set the domain of the cookie dynamically, when the user hits the page?