Skip to content

Commit 60f32d8

Browse files
committed
chore: update to return when using invalidState
1 parent 29dd4da commit 60f32d8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function defineOAuthAzureB2CEventHandler({ config, onSuccess, onError }:
102102
}
103103

104104
if (query.state !== state) {
105-
handleInvalidState(event, 'azureb2c', onError)
105+
return handleInvalidState(event, 'azureb2c', onError)
106106
}
107107

108108
console.info('code verifier', verifier.code_verifier)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function defineOAuthHerokuEventHandler({
9595
}
9696

9797
if (query.state !== state) {
98-
handleInvalidState(event, 'heroku', onError)
98+
return handleInvalidState(event, 'heroku', onError)
9999
}
100100

101101
const tokens = await requestAccessToken(config.tokenURL as string, {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function defineOAuthSalesforceEventHandler({
100100
}
101101

102102
if (query.state !== state) {
103-
handleInvalidState(event, 'salesforce', onError)
103+
return handleInvalidState(event, 'salesforce', onError)
104104
}
105105

106106
const tokens = await requestAccessToken(config.tokenURL as string, {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function defineOAuthSlackEventHandler({
9595
}
9696

9797
if (query.state !== state) {
98-
handleInvalidState(event, 'slack', onError)
98+
return handleInvalidState(event, 'slack', onError)
9999
}
100100

101101
const tokens = await requestAccessToken(config.tokenURL as string, {

0 commit comments

Comments
 (0)