Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Commit a560a98

Browse files
committed
retry with token goes bad
1 parent 4fcdac3 commit a560a98

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/uvalib-account/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uvalib/uvalib-account",
3-
"version": "0.1.20",
3+
"version": "0.1.21",
44
"description": "> TODO: description",
55
"author": "Doug Chestnut <dougchestnut@gmail.com>",
66
"homepage": "https://github.com/uvalib/web-components#readme",

packages/uvalib-account/uvalib-account-auth.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ export default class UvalibAccountAuth extends HTMLElement {
3535
this.dispatchEvent(new CustomEvent('uvalib-model-authenticated', {bubbles:true,composed:true} ));
3636
}.bind(this))
3737
.catch(function(error){
38-
console.error(`Got an error code of ${error.code} trying to login to Firebase. Reason: ${error.message}`);
39-
// window.location.href = 'http://api.library.virginia.edu/fireauth/helloOccupancy.js?dest='+window.location.href;
40-
})
38+
console.error(`Got an error code of ${error.code} trying to login to Firebase. Reason: ${error.message}`);
39+
if (this.userkey)
40+
window.location.href = 'http://api.library.virginia.edu/fireauthkeyed/helloOccupancy.js?dest='+window.location.href.replace(/\?.*/,'')+'&userkey='+this.userkey;
41+
else
42+
window.location.href = 'http://api.library.virginia.edu/fireauth/helloOccupancy.js?dest='+window.location.href;
43+
}.bind(this))
4144
}
4245

4346
}

0 commit comments

Comments
 (0)