nuxt-alt / auth

An alternative module to @nuxtjs/auth
https://nuxt-alt-auth.vercel.app/
MIT License
96 stars 20 forks source link

Get client_id from runtime config #2

Closed hendrikheil closed 1 year ago

hendrikheil commented 1 year ago

First off, a huge thank you for putting in the work for making this module available for nuxt3!

I noticed something from trying to use this module in production that is a bit cumbersome to work around. Right now it seems like one can't really define dynamic configuration like a client_id from the runtimeConfig.

Not sure if the generated plugin can be easily adjusted to merge the static strategy configuration with runtimeConfig data?

vinayakkulkarni commented 1 year ago

process.env.CLIENT_ID ?

hendrikheil commented 1 year ago

I think that unfortunately doesn't work for runtime config changes. At buildtime that variable would be replaced with the literal value, so it can't be changed by just updating the environment variables.