Skip to content

Commit 236d263

Browse files
committed
fix: use env urls as provided
1 parent e3bab3c commit 236d263

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

modules/oauth.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,8 @@ export default defineNuxtModule({
1212
async setup() {
1313
const nuxt = useNuxt()
1414

15-
const { env, previewUrl, productionUrl } = await getEnv(nuxt.options.dev)
16-
17-
let clientUri: string
18-
if (env === 'preview' && previewUrl) {
19-
clientUri = previewUrl
20-
} else if (env === 'release' && productionUrl) {
21-
clientUri = productionUrl
22-
} else {
23-
clientUri = 'http://127.0.0.1:3000'
24-
}
15+
const { previewUrl, productionUrl } = await getEnv(nuxt.options.dev)
16+
const clientUri = productionUrl || previewUrl || 'http://127.0.0.1:3000'
2517

2618
// bake it into a virtual file
2719
addServerTemplate({

0 commit comments

Comments
 (0)