Skip to content

Commit

Permalink
Merge pull request #17 from zxan1285/auto-relogin
Browse files Browse the repository at this point in the history
DXEX-56: Renew token
  • Loading branch information
zxan1285 authored Jun 13, 2019
2 parents 57b1c75 + be5e905 commit 4ec463d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] - 2019-06-13

### Changed
- App will re-login automatically on token expiration

## [2.0.1] - 2019-02-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 6 additions & 0 deletions server/views/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
2 changes: 1 addition & 1 deletion webtask.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 4ec463d

Please sign in to comment.