Skip to content

Commit

Permalink
Merge pull request #631 from internxt/feat/wt-340-refresh-drive-web-t…
Browse files Browse the repository at this point in the history
…okens-on-passwordchange

[WT-340]: Feat/Refresh drive-web session tokens after password change
  • Loading branch information
larry-internxt authored Jan 29, 2024
2 parents 182094f + 45a7a82 commit 369bb21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ export const changePassword = async (newPassword: string, currentPassword: strin
encryptedMnemonic: encryptedMnemonic,
encryptedPrivateKey: privateKeyEncrypted,
})
.then(() => {
.then((res) => {
// !TODO: Add the correct analytics event when change password is completed
const { token, newToken } = res as any;
if (token) localStorageService.set('xToken', token);
if (newToken) localStorageService.set('xNewToken', newToken);
})
.catch((error) => {
// !TODO: Add the correct analytics event when change password fails
Expand Down

1 comment on commit 369bb21

@vercel
Copy link

@vercel vercel bot commented on 369bb21 Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.