Skip to content

[PB-5247] remove old token#1918

Open
TamaraFinogina wants to merge 6 commits intomasterfrom
remove_old_token
Open

[PB-5247] remove old token#1918
TamaraFinogina wants to merge 6 commits intomasterfrom
remove_old_token

Conversation

@TamaraFinogina
Copy link
Copy Markdown
Contributor

@TamaraFinogina TamaraFinogina commented Apr 2, 2026

Description

This PR removes deprecated old token

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

unit tests

@TamaraFinogina TamaraFinogina self-assigned this Apr 2, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 2, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: d08bad6
Status: ✅  Deploy successful!
Preview URL: https://83f3e594.drive-web.pages.dev
Branch Preview URL: https://remove-old-token.drive-web.pages.dev

View logs

@TamaraFinogina TamaraFinogina marked this pull request as ready for review April 2, 2026 10:28
}

return `${baseURL}?mnemonic=${btoa(user.mnemonic)}&token=${btoa(token)}&newToken=${btoa(
return `${baseURL}?mnemonic=${btoa(user.mnemonic)}&token=${btoa(newToken)}&newToken=${btoa(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for me we should remove the oldtoken parameter. Sending the newToken instead of the oldToken will break the apps too, so its the same as removing it entirely 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@larryrider You are right, removed it

Base automatically changed from use_localstorage_type to master April 8, 2026 14:04
larryrider
larryrider previously approved these changes Apr 8, 2026
return `${baseURL}?mnemonic=${btoa(user.mnemonic)}&token=${btoa(token)}&newToken=${btoa(
newToken,
)}&privateKey=${btoa(user.privateKey)}`;
return `${baseURL}?mnemonic=${btoa(user.mnemonic)}&newToken=${btoa(newToken)}&privateKey=${btoa(user.privateKey)}`;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should remove all token related logic in mobile also before merge this

Comment thread src/views/Login/components/LogIn.tsx
Comment thread src/views/Login/components/LogIn.tsx Outdated
const handleSuccessfulAuth = (token: string, user: UserSettings, mnemonic: string): void => {
const newToken = localStorageService.get(LocalStorageItem.NewToken);
const handleSuccessfulAuth = (user: UserSettings, mnemonic: string): void => {
const newToken = localStorageService.get(LocalStorageItem.NewToken) ?? '';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To make it equivalent, I would say that the fallback must be null

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

cannot use null, newToken must be a string to pass the type check. But I added an explicit check

@TamaraFinogina TamaraFinogina changed the title remove old token [PB-5247] remove old token Apr 13, 2026
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants