From 58e7b226a4eaa1b2c0b526492c059b3e55f7fcef Mon Sep 17 00:00:00 2001 From: Alexander Zarubin Date: Mon, 27 May 2019 12:16:46 +0300 Subject: [PATCH 1/2] re-log on 401 and 403 errors --- CHANGELOG.md | 5 +++++ package.json | 2 +- server/views/index.js | 6 ++++++ webtask.json | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 011fcea..22f5bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.2] - Unreleased + +### Changed +- App will re-login automatically on token expiration + ## [2.0.1] - 2019-02-06 ### Fixed diff --git a/package.json b/package.json index 1082be9..6d154bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth0-authentication-api-debugger-extension", - "version": "2.0.1", + "version": "2.0.2", "description": "My extension for ..", "main": "index.js", "scripts": { diff --git a/server/views/index.js b/server/views/index.js index 81b8628..ac199c5 100644 --- a/server/views/index.js +++ b/server/views/index.js @@ -577,6 +577,12 @@ $(function () { bindClients(); read(); setSelectedClientSecrets(); + }).fail(function(err) { + if (err.status === 401 || err.status === 403) { + sessionStorage.removeItem('token'); + sessionStorage.removeItem('apiToken'); + window.location.href = '/login'; + } }); if ("{{method}}" === 'POST' || (window.location.hash && window.location.hash.length > 1) || (window.location.search && window.location.search.length > 1 && window.location.search !== '?webtask_no_cache=1')) { diff --git a/webtask.json b/webtask.json index 1018fbd..248dfc1 100644 --- a/webtask.json +++ b/webtask.json @@ -1,7 +1,7 @@ { "title": "Auth0 Authentication API Debugger", "name": "auth0-authentication-api-debugger", - "version": "2.0.1", + "version": "2.0.2", "author": "auth0", "useHashName": false, "description": "This extension allows you to test and debug the various Authentication API endpoints", From be5e905632e044aa450b9527843cdd372e1e7a13 Mon Sep 17 00:00:00 2001 From: Alexander Zarubin Date: Thu, 13 Jun 2019 12:08:30 +0300 Subject: [PATCH 2/2] changelog update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f5bf5..bb6a9c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.0.2] - Unreleased +## [2.0.2] - 2019-06-13 ### Changed - App will re-login automatically on token expiration