diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-03 17:04:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-03 17:04:47 +0100 |
commit | 0bc53e20296de68288481e2375b297626087174b (patch) | |
tree | a5d45a622932ee3539369dfeb9a84889176fd6f5 /client/src/app/+login | |
parent | d1a233d8d86ead1e3aa2350d5480eab3336b17d6 (diff) | |
download | PeerTube-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.ts | 5 |
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 @@ | |||
1 | import { environment } from 'src/environments/environment' | 1 | |
2 | import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 2 | import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute } from '@angular/router' |
4 | import { AuthService, Notifier, RedirectService, UserService } from '@app/core' | 4 | import { AuthService, Notifier, RedirectService, UserService } from '@app/core' |
@@ -7,6 +7,7 @@ import { LOGIN_PASSWORD_VALIDATOR, LOGIN_USERNAME_VALIDATOR } from '@app/shared/ | |||
7 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 7 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
8 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' | 8 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' |
9 | import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 9 | import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
10 | import { PluginsManager } from '@root-helpers/plugins-manager' | ||
10 | import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models' | 11 | import { 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 () { |