use runtime config
All checks were successful
Build and Publish / build-release (push) Successful in 1m1s
All checks were successful
Build and Publish / build-release (push) Successful in 1m1s
This commit is contained in:
@@ -46,12 +46,12 @@ async function loginWithZitadel() {
|
||||
>
|
||||
<UIcon v-if="isLoading" name="i-heroicons-arrow-path" class="h-5 w-5 animate-spin" />
|
||||
<UIcon v-else name="i-heroicons-lock-closed" class="h-5 w-5" />
|
||||
<span>{{ isLoading ? 'Signing in...' : 'Sign in with Zitadel' }}</span>
|
||||
<span>{{ isLoading ? 'Signing in...' : 'Sign in with CorredorConect ID' }}</span>
|
||||
</button>
|
||||
|
||||
<div class="mt-6 text-center text-xs" style="color: var(--text-muted);">
|
||||
<p>Secure authentication powered by Zitadel</p>
|
||||
<p>Secure authentication powered by CorredorConect ID</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -4,9 +4,8 @@ const devApiOrigin = 'https://dev.api.corredorconect.com'
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-02-25',
|
||||
modules: ['nuxt-open-fetch', '@nuxt/ui', '@nuxt/eslint', '@zitadel/nuxt-auth'],
|
||||
auth: {
|
||||
auth: {
|
||||
baseURL: '/api/auth',
|
||||
origin: process.env.AUTH_ORIGIN,
|
||||
provider: {
|
||||
type: 'authjs',
|
||||
trustHost: true,
|
||||
@@ -21,7 +20,13 @@ export default defineNuxtConfig({
|
||||
ui: {
|
||||
colorMode: false
|
||||
},
|
||||
runtimeConfig: {},
|
||||
runtimeConfig: {
|
||||
authOrigin: process.env.AUTH_ORIGIN || '',
|
||||
authSecret: process.env.AUTH_SECRET || '',
|
||||
zitadelDomain: process.env.ZITADEL_DOMAIN || '',
|
||||
zitadelClientId: process.env.ZITADEL_CLIENT_ID || '',
|
||||
zitadelProjectId: process.env.ZITADEL_PROJECT_ID
|
||||
},
|
||||
openFetch: {
|
||||
clients: {
|
||||
customer: {
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import { NuxtAuthHandler } from '#auth'
|
||||
import ZitadelProvider from '@auth/core/providers/zitadel'
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
export default NuxtAuthHandler({
|
||||
secret: process.env.AUTH_SECRET,
|
||||
secret: config.authSecret,
|
||||
providers: [
|
||||
ZitadelProvider({
|
||||
clientId: process.env.ZITADEL_CLIENT_ID,
|
||||
issuer: process.env.ZITADEL_DOMAIN,
|
||||
clientId: config.zitadelClientId,
|
||||
issuer: config.zitadelDomain,
|
||||
pkce: true,
|
||||
authorization: {
|
||||
params: {
|
||||
scope: `openid email profile offline_access urn:zitadel:iam:org:project:${process.env.ZITADEL_PROJECT_ID}:aud`
|
||||
scope: `openid email profile offline_access urn:zitadel:iam:org:project:${config.projectId}:aud`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user