Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Fixes issue 102 #106

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ authenticator
.catch(OfficeHelpers.Utilities.log);

// get the cached token if any. returns null otherwise.
var token = authenticator.tokens.get('name of endpoint');
var token = authenticator.tokens.getValidToken('name of endpoint');
```
If a cached token expires, then the dialog is automatically launched to re-authenticate the user.
> Note on Refresh Tokens: By default, Implicit OAuth does not support Token Refresh as a security measure. This is because Access Tokens cannot be securely stored inside of a JavaScript client.
Expand Down
2 changes: 1 addition & 1 deletion src/authentication/token.manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class TokenStorage extends Storage<IToken> {
* @param {string} provider Unique name of the corresponding OAuth Token.
* @return {object} Returns the token or null if its either expired or doesn't exist.
*/
get(provider: string): IToken {
getValidToken(provider: string): IToken {
let token = super.get(provider);
if (token == null) {
return token;
Expand Down