@@ -445,16 +445,18 @@ export class GenericAuthProvider implements AuthProvider {
445
445
}
446
446
447
447
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
+ } ;
448
453
if (
449
454
TosFlow . WithIdentity . is ( flowContext ) ||
450
455
( TosFlow . WithUser . is ( flowContext ) && flowContext . termsAcceptanceRequired )
451
456
) {
452
457
// This is the regular path on sign up. We just went through the OAuth2 flow but didn't create a Gitpod
453
458
// 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 ) ;
458
460
459
461
// attach the sign up info to the session, in order to proceed after acceptance of terms
460
462
await TosFlow . attach ( request . session ! , flowContext ) ;
@@ -463,10 +465,7 @@ export class GenericAuthProvider implements AuthProvider {
463
465
return ;
464
466
} else {
465
467
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 ) ;
470
469
471
470
// Complete login
472
471
const { host, returnTo } = authFlow ;
0 commit comments