aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+login
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-03 17:04:47 +0100
committerChocobozzz <me@florianbigard.com>2021-12-03 17:04:47 +0100
commit0bc53e20296de68288481e2375b297626087174b (patch)
treea5d45a622932ee3539369dfeb9a84889176fd6f5 /client/src/app/+login
parentd1a233d8d86ead1e3aa2350d5480eab3336b17d6 (diff)
downloadPeerTube-0bc53e20296de68288481e2375b297626087174b.tar.gz
PeerTube-0bc53e20296de68288481e2375b297626087174b.tar.zst
PeerTube-0bc53e20296de68288481e2375b297626087174b.zip
Add ability to redirect users on external auth
Diffstat (limited to 'client/src/app/+login')
-rw-r--r--client/src/app/+login/login.component.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index 1fa4bd3b5..648b8db36 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -1,4 +1,4 @@
1import { environment } from 'src/environments/environment' 1
2import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core' 2import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core'
3import { ActivatedRoute } from '@angular/router' 3import { ActivatedRoute } from '@angular/router'
4import { AuthService, Notifier, RedirectService, UserService } from '@app/core' 4import { AuthService, Notifier, RedirectService, UserService } from '@app/core'
@@ -7,6 +7,7 @@ import { LOGIN_PASSWORD_VALIDATOR, LOGIN_USERNAME_VALIDATOR } from '@app/shared/
7import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 7import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
8import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' 8import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
9import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 9import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
10import { PluginsManager } from '@root-helpers/plugins-manager'
10import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models' 11import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models'
11 12
12@Component({ 13@Component({
@@ -98,7 +99,7 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
98 } 99 }
99 100
100 getAuthHref (auth: RegisteredExternalAuthConfig) { 101 getAuthHref (auth: RegisteredExternalAuthConfig) {
101 return environment.apiUrl + `/plugins/${auth.name}/${auth.version}/auth/${auth.authName}` 102 return PluginsManager.getExternalAuthHref(auth)
102 } 103 }
103 104
104 login () { 105 login () {