Skip to content

Commit

Permalink
Merge pull request #23 from fga-eps-mds/fix#108/remove-log
Browse files Browse the repository at this point in the history
[FIX] Remoção de loggers  (fga-eps-mds/2024.2-ARANDU-DOC#108)
  • Loading branch information
dartmol203 authored Jan 11, 2025
2 parents 76478e6 + 012176c commit 5e1c347
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export class AuthController {

@Post('login')
async login(@Body() loginDto: LoginDto) {
this.logger.log('AuthController - Login Request:', loginDto);

const user = await this.authService.validateUser(
loginDto.email,
Expand All @@ -48,7 +47,7 @@ export class AuthController {
@Get('google/callback')
@UseGuards(AuthGuard('google'))
googleAuthRedirect(@Req() req: Request, @Res() res: Response) {
this.logger.log('AuthController - Google Callback Request:', req.user);
//this.logger.log('AuthController - Google Callback Request:', req.user);
this.authService.redirectFederated(req.user as any, res);
}

Expand All @@ -61,10 +60,10 @@ export class AuthController {
@Get('microsoft/callback')
@UseGuards(AuthGuard('microsoft'))
microsoftAuthRedirect(@Req() req: Request, @Res() res: Response) {
this.logger.log(
'AuthController - Microsoft Callback Request:',
JSON.stringify(req.user),
);
//this.logger.log(
//'AuthController - Microsoft Callback Request:',
// JSON.stringify(req.user),
//);
this.authService.redirectFederated(req.user as any, res);
}

Expand Down
2 changes: 1 addition & 1 deletion src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class AuthService {
}

redirectFederated(user: any, res: Response) {
this.logger.log('redirectFederated', user);
//this.logger.log('redirectFederated', user);
const { accessToken, refreshToken } = user || {};

if (accessToken) {
Expand Down
2 changes: 1 addition & 1 deletion src/auth/strategies/google.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
profile: Profile,
done: VerifyCallback,
) {
this.logger.log('GoogleStrategy - Profile:', profile);
//this.logger.log('GoogleStrategy - Profile:', profile);
const { user, token } = await this.authService.loginFederated({
email: profile.emails[0].value,
name: profile.displayName,
Expand Down
2 changes: 1 addition & 1 deletion src/auth/strategies/microsoft.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class MicrosoftStrategy extends PassportStrategy(Strategy, 'microsoft') {
profile: Profile,
done: VerifyCallback,
) {
this.logger.log('MicrosoftStrategy - Profile:', JSON.stringify(profile));
//this.logger.log('MicrosoftStrategy - Profile:', JSON.stringify(profile));
const { user, token } = await this.authService.loginFederated({
email: profile.emails[0].value,
name: profile.displayName,
Expand Down

0 comments on commit 5e1c347

Please sign in to comment.