Redirect internally after login instead of client side

* Fixes Tautulli/Tautulli-Issues#300
This commit is contained in:
JonnyWong16 2021-01-29 10:04:34 -08:00
parent 674966510d
commit 6a534ade9f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 5 additions and 1 deletions

View file

@ -160,7 +160,7 @@
dataType: 'json',
statusCode: {
200: function(xhr, status) {
window.location = "${redirect_uri or http_root}";
window.location = "redirect?redirect_uri=${redirect_uri}";
},
401: function(xhr, status) {
if (plex) {

View file

@ -419,3 +419,7 @@ class AuthController(object):
logger.debug("Tautulli WebAuth :: Invalid Plex OAuth login attempt.")
cherrypy.response.status = 401
return error_message
@cherrypy.expose
def redirect(self, redirect_uri='', *args, **kwargs):
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + redirect_uri.strip('/'))