File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,7 @@ export function createAuthorizeHandler(oauthServer: OAuth2Server) {
133133
134134 logger . info ( "Authorization code granted" , {
135135 clientId : authorizationCode . client . id ,
136- userId : user . id ,
137- code : authorizationCode . authorizationCode . substring ( 0 , 8 ) + "..."
136+ userId : user . id
138137 } ) ;
139138
140139 // Redirect back to client with authorization code
Original file line number Diff line number Diff line change @@ -126,14 +126,14 @@ export class OAuthProvider {
126126
127127 const codeData = this . #authorizationCodes. get ( code ) ;
128128 if ( ! codeData ) {
129- logger . warn ( "Invalid authorization code" , { code : code . substring ( 0 , 8 ) + "..." } ) ;
129+ logger . warn ( "Invalid authorization code" , { codeLength : code . length } ) ;
130130 return null ;
131131 }
132132
133133 // Check expiration
134134 if ( codeData . expiresAt < new Date ( ) ) {
135135 this . #authorizationCodes. delete ( code ) ;
136- logger . warn ( "Expired authorization code" , { code : code . substring ( 0 , 8 ) + "..." } ) ;
136+ logger . warn ( "Expired authorization code" , { codeLength : code . length } ) ;
137137 return null ;
138138 }
139139
@@ -150,7 +150,7 @@ export class OAuthProvider {
150150
151151 // PKCE verification
152152 if ( ! this . verifyPKCE ( codeVerifier , codeData . codeChallenge ) ) {
153- logger . warn ( "PKCE verification failed" , { code : code . substring ( 0 , 8 ) + "..." } ) ;
153+ logger . warn ( "PKCE verification failed" , { codeLength : code . length } ) ;
154154 return null ;
155155 }
156156
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export class ManagedOAuthServer {
156156 } ,
157157
158158 // OAuth 2.1 configuration
159- requireClientAuthentication : { authorization_code : false } ,
159+ requireClientAuthentication : { authorization_code : true } ,
160160 allowBearerTokensInQueryString : false ,
161161 accessTokenLifetime : 3600 , // 1 hour
162162 authorizationCodeLifetime : 600 , // 10 minutes
You can’t perform that action at this time.
0 commit comments