From 87953b1a252e65675682685aefa8379aa017e9e2 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 22 May 2017 08:44:16 +1200 Subject: [PATCH] Detect and alert authentication errors --- auth.php | 30 +++++++---- .../components/SpotifyAuthenticationFrame.js | 52 +++++++++++++------ 2 files changed, 56 insertions(+), 26 deletions(-) diff --git a/auth.php b/auth.php index 61585234..d93c5ecc 100755 --- a/auth.php +++ b/auth.php @@ -3,18 +3,18 @@ // allow cross-domain requests header("Access-Control-Allow-Origin: *"); -$url = 'http://jamesbarnsley.co.nz/auth.php'; +$url = 'https://jamesbarnsley.co.nz/auth.php'; -if( isset($_GET['app']) ) +if (isset($_GET['app'])){ setcookie( 'mopidy_iris', $_GET['app'], time()+3600 ); - +} /* ================================================================================= INIT ================ */ /* ======================================================================================================= */ // we've just completed authorization, now create credentials (access_token, etc) -if( isset($_GET['code']) ){ +if (isset($_GET['code'])){ // go get our credentials $response = getToken( $_GET['code'], $url ); @@ -30,7 +30,7 @@ if( isset($_GET['code']) ){ die(); } - // send our data back to Spotmop + // send our data back to Iris ?> + +