X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fmenu%2Fmenu.component.ts;h=568cb98bb2e9950b19126192af44fded2796078e;hb=2570fd9c1c879d1a543fb0dff1e7cfb036234d11;hp=63f01df92f560b891a8b10bbbc4feab2b6bde463;hpb=60b880acdfa85eab5c9ec09ba1283f82ae58ec85;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 63f01df92..568cb98bb 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts @@ -1,6 +1,7 @@ import { HotkeysService } from 'angular2-hotkeys' import * as debug from 'debug' import { switchMap } from 'rxjs/operators' +import { environment } from 'src/environments/environment' import { ViewportScroller } from '@angular/common' import { Component, OnInit, ViewChild } from '@angular/core' import { Router } from '@angular/router' @@ -131,12 +132,7 @@ export class MenuComponent implements OnInit { } getExternalLoginHref () { - if (!this.serverConfig || this.serverConfig.client.menu.login.redirectOnSingleExternalAuth !== true) return undefined - - const externalAuths = this.serverConfig.plugin.registeredExternalAuths - if (externalAuths.length !== 1) return undefined - - return PluginsManager.getExternalAuthHref(externalAuths[0]) + return PluginsManager.getDefaultLoginHref(environment.apiUrl, this.serverConfig) } isRegistrationAllowed () {