diff --git a/playground/server/routes/auth/seznam.get.ts b/playground/server/routes/auth/seznam.get.ts index 19aca33..73cff79 100644 --- a/playground/server/routes/auth/seznam.get.ts +++ b/playground/server/routes/auth/seznam.get.ts @@ -1,4 +1,4 @@ -export default defineOAUthSeznamEventHandler({ +export default defineOAuthSeznamEventHandler({ config: { scope: ['identity'], }, diff --git a/src/runtime/server/lib/oauth/seznam.ts b/src/runtime/server/lib/oauth/seznam.ts index 533a579..5f3fbfb 100644 --- a/src/runtime/server/lib/oauth/seznam.ts +++ b/src/runtime/server/lib/oauth/seznam.ts @@ -116,9 +116,9 @@ export interface OAuthSeznamUser { gender?: string | null } -export function defineOAUthSeznamEventHandler({ config, onSuccess, onError }: OAuthConfig) { +export function defineOAuthSeznamEventHandler({ config, onSuccess, onError }: OAuthConfig) { return eventHandler(async (event: H3Event) => { - config = defu(config, useRuntimeConfig(event).oauth?.google, { + config = defu(config, useRuntimeConfig(event).oauth?.seznam, { authorizationURL: 'https://login.szn.cz/api/v1/oauth/auth', tokenURL: 'https://login.szn.cz/api/v1/oauth/token', userURL: 'https://login.szn.cz/api/v1/user',