Skip to content

Commit 5a19972

Browse files
committed
up
1 parent c3f1ae3 commit 5a19972

File tree

1 file changed

+3
-4
lines changed
  • src/runtime/server/lib/oauth

1 file changed

+3
-4
lines changed

src/runtime/server/lib/oauth/okta.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function defineOAuthOktaEventHandler({ config, onSuccess, onError }: OAut
4949
}) as OAuthOktaConfig
5050

5151
if (!config.clientId || !config.clientSecret || !config.domain) {
52-
return handleMissingConfiguration(event, 'auth0', ['clientId', 'clientSecret', 'domain'], onError)
52+
return handleMissingConfiguration(event, 'okta', ['clientId', 'clientSecret', 'domain'], onError)
5353
}
5454
const authorizationURL = `https://${config.domain}.okta.com/oauth2/v1/authorize`
5555
const tokenURL = `https://${config.domain}.okta.com/oauth2/v1/token`
@@ -90,12 +90,11 @@ export function defineOAuthOktaEventHandler({ config, onSuccess, onError }: OAut
9090
}
9191

9292
const accessToken = tokens.access_token
93-
// TODO: improve typing
9493
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9594
const emails: any[] = await $fetch(`https://${config.domain}.okta.com/idp/myaccount/emails`, {
9695
headers: {
97-
'Accept': 'application/json; okta-version=1.0.0',
98-
'Authorization': `Bearer ${accessToken}`,
96+
Accept: 'application/json; okta-version=1.0.0',
97+
Authorization: `Bearer ${accessToken}`,
9998
},
10099
})
101100

0 commit comments

Comments
 (0)