@@ -445,16 +445,18 @@ export class GenericAuthProvider implements AuthProvider {
445445 }
446446
447447 if ( flowContext ) {
448+ const logPayload = {
449+ withIdentity : TosFlow . WithIdentity . is ( flowContext ) ? flowContext . candidate : undefined ,
450+ withUser : TosFlow . WithUser . is ( flowContext ) ? User . censor ( flowContext . user ) : undefined ,
451+ ...defaultLogPayload ,
452+ } ;
448453 if (
449454 TosFlow . WithIdentity . is ( flowContext ) ||
450455 ( TosFlow . WithUser . is ( flowContext ) && flowContext . termsAcceptanceRequired )
451456 ) {
452457 // This is the regular path on sign up. We just went through the OAuth2 flow but didn't create a Gitpod
453458 // account yet, as we require to accept the terms first.
454- log . info ( context , `(${ strategyName } ) Redirect to /api/tos` , {
455- info : flowContext ,
456- ...defaultLogPayload ,
457- } ) ;
459+ log . info ( context , `(${ strategyName } ) Redirect to /api/tos` , logPayload ) ;
458460
459461 // attach the sign up info to the session, in order to proceed after acceptance of terms
460462 await TosFlow . attach ( request . session ! , flowContext ) ;
@@ -463,10 +465,7 @@ export class GenericAuthProvider implements AuthProvider {
463465 return ;
464466 } else {
465467 const { user, elevateScopes } = flowContext as TosFlow . WithUser ;
466- log . info ( context , `(${ strategyName } ) Directly log in and proceed.` , {
467- info : flowContext ,
468- ...defaultLogPayload ,
469- } ) ;
468+ log . info ( context , `(${ strategyName } ) Directly log in and proceed.` , logPayload ) ;
470469
471470 // Complete login
472471 const { host, returnTo } = authFlow ;
0 commit comments