mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Fixed #3143
This commit is contained in:
parent
e54ec746d6
commit
036230d4cf
1 changed files with 5 additions and 2 deletions
|
@ -139,8 +139,10 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private oAuthWindow: Window;
|
||||||
|
|
||||||
public oauth() {
|
public oauth() {
|
||||||
const oAuthWindow = window.open(window.location.toString(), "_blank", `toolbar=0,
|
this.oAuthWindow = window.open(window.location.toString(), "_blank", `toolbar=0,
|
||||||
location=0,
|
location=0,
|
||||||
status=0,
|
status=0,
|
||||||
menubar=0,
|
menubar=0,
|
||||||
|
@ -151,7 +153,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
this.plexTv.GetPin(this.clientId, this.appName).subscribe((pin: any) => {
|
this.plexTv.GetPin(this.clientId, this.appName).subscribe((pin: any) => {
|
||||||
|
|
||||||
this.authService.login({ usePlexOAuth: true, password: "", rememberMe: true, username: "", plexTvPin: pin }).subscribe(x => {
|
this.authService.login({ usePlexOAuth: true, password: "", rememberMe: true, username: "", plexTvPin: pin }).subscribe(x => {
|
||||||
oAuthWindow!.location.replace(x.url);
|
this.oAuthWindow!.location.replace(x.url);
|
||||||
|
|
||||||
this.pinTimer = setInterval(() => {
|
this.pinTimer = setInterval(() => {
|
||||||
|
|
||||||
|
@ -171,6 +173,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
|
|
||||||
if (this.authService.loggedIn()) {
|
if (this.authService.loggedIn()) {
|
||||||
this.ngOnDestroy();
|
this.ngOnDestroy();
|
||||||
|
this.oAuthWindow.close();
|
||||||
this.router.navigate(["search"]);
|
this.router.navigate(["search"]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue