mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add popup OAuth window to wizard and settings
This commit is contained in:
parent
d9ea781462
commit
c2ba2b4e98
2 changed files with 12 additions and 2 deletions
|
@ -2294,7 +2294,9 @@ $(document).ready(function() {
|
|||
const code = data.code;
|
||||
var keep_polling = true;
|
||||
|
||||
window.open('https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code);
|
||||
var plex_oauth_window = PopupCenter(
|
||||
'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code,
|
||||
'Plex-OAuth', 600, 700);
|
||||
|
||||
(function poll() {
|
||||
polling = setTimeout(function () {
|
||||
|
@ -2306,6 +2308,9 @@ $(document).ready(function() {
|
|||
if (data.authToken){
|
||||
var authToken = data.authToken;
|
||||
keep_polling = false;
|
||||
if (plex_oauth_window) {
|
||||
plex_oauth_window.close();
|
||||
}
|
||||
$("#pms_token").val(authToken);
|
||||
$("#pms_uuid").val(x_plex_headers['X-Plex-Client-Identifier']);
|
||||
$("#token_verify").html('<i class="fa fa-check"></i>').fadeIn('fast');
|
||||
|
|
|
@ -507,7 +507,9 @@ $(document).ready(function() {
|
|||
const code = data.code;
|
||||
var keep_polling = true;
|
||||
|
||||
window.open('https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code);
|
||||
var plex_oauth_window = PopupCenter(
|
||||
'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code,
|
||||
'Plex-OAuth', 600, 700);
|
||||
|
||||
(function poll() {
|
||||
polling = setTimeout(function () {
|
||||
|
@ -519,6 +521,9 @@ $(document).ready(function() {
|
|||
if (data.authToken){
|
||||
var authToken = data.authToken;
|
||||
keep_polling = false;
|
||||
if (plex_oauth_window) {
|
||||
plex_oauth_window.close();
|
||||
}
|
||||
$("#pms_token").val(authToken);
|
||||
$("#pms-token-status").html('<i class="fa fa-check"></i> Authentication successful.').fadeIn('fast');
|
||||
authenticated = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue