droni.co
droni.co
NNuxt
Created by droni.co on 4/29/2024 in #❓・help
Call cifigurarion env vars async
Hi everyone, Im creating a simple app using Nuxt3 and authenticate with sidebase-auth, my problem is that I need to call secrets and configurations asyncronusly from a funcion, not from .env file There is some way to do that? something like
return NuxtAuthHandler({
secret: process.env.SECRET_KEY,
pages: {
signIn: '/login'
},
providers: [
AzureADProvider.default({
clientId: await myAsyncFunct('my_secret_clientId'),
clientSecret: await myAsyncFunct('my_secret_clientSecret'),
tenantId: await myAsyncFunct('my_secret_tenantId')
}),
]
})
return NuxtAuthHandler({
secret: process.env.SECRET_KEY,
pages: {
signIn: '/login'
},
providers: [
AzureADProvider.default({
clientId: await myAsyncFunct('my_secret_clientId'),
clientSecret: await myAsyncFunct('my_secret_clientSecret'),
tenantId: await myAsyncFunct('my_secret_tenantId')
}),
]
})
Pleas help
1 replies