File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export type VerifyFunctionWithRequest = (
2626/**
2727 * Retrieve an openid-client DPoPHandle for a given request.
2828 */
29- export type getDPoPHandle = ( req : express . Request ) => client . DPoPHandle
29+ export type getDPoPHandle = (
30+ req : express . Request ,
31+ ) => Promise < client . DPoPHandle | undefined > | client . DPoPHandle | undefined
3032
3133interface StrategyOptionsBase {
3234 /**
@@ -256,7 +258,7 @@ export class Strategy implements passport.Strategy {
256258 redirectTo . searchParams . set ( 'scope' , this . _scope )
257259 }
258260
259- const DPoP = this . _DPoP ?.( req )
261+ const DPoP = await this . _DPoP ?.( req )
260262
261263 if ( DPoP && ! redirectTo . searchParams . has ( 'dpop_jkt' ) ) {
262264 redirectTo . searchParams . set (
@@ -366,7 +368,7 @@ export class Strategy implements passport.Strategy {
366368 maxAge : stateData . max_age ,
367369 } ,
368370 this . authorizationCodeGrantParameters ( req , options ) ,
369- { DPoP : this . _DPoP ?.( req ) } ,
371+ { DPoP : await this . _DPoP ?.( req ) } ,
370372 )
371373
372374 const verified : passport . AuthenticateCallback = ( err , user , info ) => {
You can’t perform that action at this time.
0 commit comments