Skip to content

Commit

Permalink
Reflect user.data to currentUser.value.data
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Apr 10, 2024
1 parent 3365a3b commit d2c12e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions addons/dexie-cloud/src/authentication/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export async function refreshAccessToken(
if (response.userValidUntil != null) {
login.license.validUntil = new Date(response.userValidUntil);
}
if (response.data) {
login.data = response.data;
}
return login;
}

Expand Down Expand Up @@ -208,6 +211,7 @@ async function userAuthenticate(
type: response2.userType,
status: response2.claims.license || 'ok',
}
context.data = response2.data;
if (response2.evalDaysLeft != null) {
context.license.evalDaysLeft = response2.evalDaysLeft;
}
Expand Down
1 change: 1 addition & 0 deletions addons/dexie-cloud/src/db/entities/UserLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export interface UserLogin {
nonExportablePrivateKey?: CryptoKey;
publicKey?: CryptoKey;
isLoggedIn?: boolean;
data?: any; // From user data
}
2 changes: 1 addition & 1 deletion libs/dexie-cloud-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dexie-cloud-common",
"version": "1.0.32",
"version": "1.0.33",
"description": "Library for shared code between dexie-cloud-addon, dexie-cloud (CLI) and dexie-cloud-server",
"type": "module",
"module": "dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions libs/dexie-cloud-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface TokenFinalResponse {
message: string;
messageParams?: { [param: string]: string };
}[];
data?: any;
}

export interface TokenOtpSentResponse {
Expand Down

0 comments on commit d2c12e2

Please sign in to comment.