Add popup OAuth window to wizard and settings
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user