Open wensaint opened 2 years ago
I find the solution by change the source code.
filePath : src/core/storage.ts
line: 29
// this.options = options
// add runtimeConfig support by wensaint
this.options = {
...options,
...(this.ctx.$config && this.ctx.$config.auth)
}
Current I fixed this at my folk: https://github.com/wensaint/auth-module I hope this will be accepted in the future.
We are quite probably several thousands in the need for this runtimeConfig support. It is a basic requirement for any nuxt module now.
Is there still someone maintaining this repository ? Please we would appreciate an update, a merge of what as been proposed many time, i would add a lot to the auth-module.
I will be honest, waiting for you to support runtime config, i made my own auth layer :( What @wensaint showed, could it be applied ?
Thank you maintainers
Is your feature request related to a problem? Please describe.
my project need one build, muti deploy.
currently i use cookie(localStorage will be the same) to save auth token, but the auth options is build in during build process.
so if i deploy muti sites in the same domain, user login in site A will be able to access site B without login.
Describe the solution you'd like to see
If i can config auth within RuntimeConfig (either publicRuntimeConfig or privateRuntimeConfig), the options can be change at runtime, then every site will have unique cookie, it will be great.