Skip to content

Commit

Permalink
fix: authentication onBeforeRequest callback support async function (
Browse files Browse the repository at this point in the history
  • Loading branch information
JOU-amjs authored Jul 29, 2024
1 parent c0c4641 commit 5d9bc65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const createClientTokenAuthentication = ({
if (!isVisitorRole && !isLoginRole) {
await assignToken(method);
}
onBeforeRequest?.(method);
return onBeforeRequest?.(method);
},
onResponseRefreshToken: onRespondedHandlers => {
const respondedRecord = onResponded2Record(onRespondedHandlers);
Expand Down Expand Up @@ -113,7 +113,7 @@ export const createServerTokenAuthentication = ({
if (!isVisitorRole && !isLoginRole) {
await assignToken(method);
}
onBeforeRequest?.(method);
return onBeforeRequest?.(method);
},
onResponseRefreshToken: onRespondedHandlers => {
const respondedRecord = onResponded2Record(onRespondedHandlers);
Expand Down

0 comments on commit 5d9bc65

Please sign in to comment.