Skip to content

Commit

Permalink
Update data after refreshing access token
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Apr 13, 2024
1 parent d2c12e2 commit b892899
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/dexie-cloud/src/sync/connectWebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export function connectWebSocket(db: DexieCloudDB) {
accessTokenExpiration: refreshedLogin.accessTokenExpiration,
claims: refreshedLogin.claims,
license: refreshedLogin.license,
data: refreshedLogin.data
});
}),
switchMap(() => createObservable())
Expand Down
1 change: 1 addition & 0 deletions addons/dexie-cloud/src/sync/messagesFromServerQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function MessagesFromServerConsumer(db: DexieCloudDB) {
accessTokenExpiration: refreshedLogin.accessTokenExpiration,
claims: refreshedLogin.claims,
license: refreshedLogin.license,
data: refreshedLogin.data,
});
// Updating $logins will trigger emission of db.cloud.currentUser observable, which
// in turn will lead to that connectWebSocket.ts will reconnect the socket with the
Expand Down

0 comments on commit b892899

Please sign in to comment.