Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
c039c88b
Commit
c039c88b
authored
Jul 13, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `readLastUsedToken` to `loadToken`.
Rename for consistency with `saveToken`.
parent
3404a69c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
oauth-auth.js
src/sidebar/oauth-auth.js
+4
-3
No files found.
src/sidebar/oauth-auth.js
View file @
c039c88b
...
...
@@ -108,9 +108,10 @@ function auth($http, $window, flash, localStorage, random, settings) {
}
/**
* Read the last-saved access/refresh tokens for `authority`.
* Fetch the last-saved access/refresh tokens for `authority` from local
* storage.
*/
function
readLastUse
dToken
(
authority
)
{
function
loa
dToken
(
authority
)
{
var
token
=
localStorage
.
getObject
(
storageKey
(
authority
));
if
(
!
token
||
...
...
@@ -241,7 +242,7 @@ function auth($http, $window, flash, localStorage, random, settings) {
}
else
{
// Attempt to load the tokens from the previous session.
var
authority
=
getAuthority
(
settings
);
var
tokenInfo
=
readLastUse
dToken
(
authority
);
var
tokenInfo
=
loa
dToken
(
authority
);
if
(
!
tokenInfo
)
{
// No token. The user will need to log in.
accessTokenPromise
=
Promise
.
resolve
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment