sidebase / nuxt-auth

Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
https://auth.sidebase.io
MIT License
1.25k stars 162 forks source link

Unification and flexibility with `AUTH_ORIGIN` #836

Closed hywax closed 1 month ago

hywax commented 2 months ago

Describe the feature

What problems there are now:

How would you implement this?

1) Switch completely to useRuntimeConfig(). This will get rid of naming inconsistencies 2) Add to nuxt.config the ability to set the variable dynamically

An example of how it will look like: nuxt.config.ts

export default defineNuxtConfig({
  runtimeConfig: {
    authOrigin: '',
  },
  auth: {
    originEnvKey: 'AUTH_ORIGIN' // by default
  }
})

.env

NUXT_AUTH_ORIGIN=https://my.app

Additional information

Provider