Skip to content

Commit bce147a

Browse files
committed
chore: revert import change; simplify fix
1 parent 60f1e5e commit bce147a

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { defu } from 'defu'
1414
import { genInterface } from 'knitwork'
1515
import type { DeepRequired } from 'ts-essentials'
16-
import type { NuxtModule } from '@nuxt/schema'
16+
import type { NuxtModule } from 'nuxt/schema'
1717
import { isProduction } from './runtime/helpers'
1818
import type {
1919
AuthProviders,

src/runtime/utils/fetch.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { resolveApiUrlPath } from './url'
22
import { ERROR_PREFIX } from './logger'
3-
import { useRequestEvent, useRuntimeConfig } from '#imports'
3+
import { useRequestEvent } from '#imports'
44
import type { useNuxtApp } from '#imports'
55
import { callWithNuxt } from '#app/nuxt'
66
import type { H3Event } from 'h3'
@@ -11,11 +11,7 @@ export async function _fetch<T>(
1111
fetchOptions: Parameters<typeof $fetch>[1] = {},
1212
proxyCookies = false
1313
): Promise<T> {
14-
// This fixes https://github.com/sidebase/nuxt-auth/issues/927
15-
const runtimeConfigOrPromise = callWithNuxt(nuxt, useRuntimeConfig)
16-
const runtimeConfig = 'public' in runtimeConfigOrPromise
17-
? runtimeConfigOrPromise
18-
: await runtimeConfigOrPromise
14+
const runtimeConfig = nuxt.$config
1915

2016
const joinedPath = resolveApiUrlPath(path, runtimeConfig)
2117

0 commit comments

Comments
 (0)