File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
oauth2-server-config/server/oauth Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export function authenticationMiddleware(
2727 if ( userId && authToken ) {
2828 req . user = ( await Users . findOneByIdAndLoginToken ( userId as string , hashLoginToken ( authToken as string ) ) ) || undefined ;
2929 } else {
30- req . user = ( await oAuth2ServerAuth ( req ) ) ?. user ;
30+ req . user = await oAuth2ServerAuth ( {
31+ headers : req . headers as Record < string , string | undefined > ,
32+ query : req . query as Record < string , string | undefined > ,
33+ } ) ;
3134 }
3235
3336 if ( config . rejectUnauthorized && ! req . user ) {
Original file line number Diff line number Diff line change @@ -83,4 +83,3 @@ API.v1.addAuthMethod((request: globalThis.Request) => {
8383} ) ;
8484
8585( WebApp . connectHandlers as unknown as ReturnType < typeof express > ) . use ( oauth2server . app ) ;
86-
You can’t perform that action at this time.
0 commit comments