mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Popup window for Plex OAuth
This commit is contained in:
parent
176392d837
commit
5ee5ca7dbf
2 changed files with 26 additions and 1 deletions
|
@ -163,7 +163,9 @@
|
|||
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 () {
|
||||
|
@ -174,6 +176,9 @@
|
|||
success: function (data) {
|
||||
if (data.authToken){
|
||||
keep_polling = false;
|
||||
if (plex_oauth_window) {
|
||||
plex_oauth_window.close();
|
||||
}
|
||||
signIn(true, data.authToken);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue