Skip to content

Commit

Permalink
fix: Mark a token as valid when data is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Oct 25, 2024
1 parent a4fefa8 commit 522ef1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-wombats-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labdigital/federated-token": patch
---

Properly mark token as valid
3 changes: 3 additions & 0 deletions packages/core/src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,19 @@ export class FederatedToken {
setAccessToken(name: string, token: AccessToken) {
this.tokens[name] = token;
this._accessTokenModified = true;
this._hasData = true;
}

setRefreshToken(name: string, token: string) {
this.refreshTokens[name] = token;
this._refreshTokenModified = true;
this._hasData = true;
}

setValue(name: string, value: any): void {
this.values[name] = value;
this._valueModified = true;
this._hasData = true;
}

isAccessTokenModified() {
Expand Down

0 comments on commit 522ef1c

Please sign in to comment.