Make auth module optional to conditionnaly load auth providers (#518)
* Make auth module optional to conditionnaly load auth providers * Fixes
This commit is contained in:
@ -16,17 +16,10 @@ export type GoogleRequest = Request & {
|
||||
@Injectable()
|
||||
export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
|
||||
constructor(environmentService: EnvironmentService) {
|
||||
const isAuthGoogleEnabled = environmentService.getAuthGoogleEnabled();
|
||||
super({
|
||||
clientID: isAuthGoogleEnabled
|
||||
? environmentService.getAuthGoogleClientId()
|
||||
: 'disabled',
|
||||
clientSecret: isAuthGoogleEnabled
|
||||
? environmentService.getAuthGoogleClientSecret()
|
||||
: 'disabled',
|
||||
callbackURL: isAuthGoogleEnabled
|
||||
? environmentService.getAuthGoogleCallbackUrl()
|
||||
: 'disabled',
|
||||
clientID: environmentService.getAuthGoogleClientId(),
|
||||
clientSecret: environmentService.getAuthGoogleClientSecret(),
|
||||
callbackURL: environmentService.getAuthGoogleCallbackUrl(),
|
||||
scope: ['email', 'profile'],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user