Skip to content

Guidepoint: Enhancement - Clear cookies after sign out#2051

Merged
JohnathanWhite merged 2 commits intobitpay:masterfrom
cmgustavo:guidepoint/feat/android-cookies-01
Mar 4, 2026
Merged

Guidepoint: Enhancement - Clear cookies after sign out#2051
JohnathanWhite merged 2 commits intobitpay:masterfrom
cmgustavo:guidepoint/feat/android-cookies-01

Conversation

@cmgustavo
Copy link
Copy Markdown
Member

GP-16

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a logout-time cookie cleanup to ensure BitPay ID sign-out clears web/session cookies across platforms.

Changes:

  • Add @preeternal/react-native-cookie-manager dependency (JS + iOS pods).
  • Introduce clearAllCookiesEverywhere() utility to clear cookie stores on iOS/Android.
  • Invoke cookie clearing as part of startDisconnectBitPayId logout flow.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/cookieAuth.ts New cross-platform cookie clearing helper.
src/store/bitpay-id/bitpay-id.effects.ts Calls cookie clearing during BitPay ID disconnect/logout.
package.json Adds cookie manager dependency (and minor dependency ordering changes).
yarn.lock Locks the new cookie manager package version.
ios/Podfile.lock Adds the CookieManager pod for iOS builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/store/bitpay-id/bitpay-id.effects.ts Outdated
@cmgustavo cmgustavo force-pushed the guidepoint/feat/android-cookies-01 branch from 1945aec to 0fc9fee Compare February 24, 2026 11:18
Comment thread src/store/bitpay-id/bitpay-id.effects.ts Outdated
try {
await clearAllCookiesEverywhere();
} catch (err) {
logManager.debug('An error occured while clearing cookies.');
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.

would use logManager.error instead of debug

Copy link
Copy Markdown
Member Author

@cmgustavo cmgustavo Feb 25, 2026

Choose a reason for hiding this comment

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

I think that it's not an error that avoid the app continue running normally, and also it's not important for all the most users. Maybe the text is not correct in this case, but the other try/catch are using debug instead error.

@cmgustavo cmgustavo force-pushed the guidepoint/feat/android-cookies-01 branch from 0fc9fee to 0e4a700 Compare February 25, 2026 03:41
Comment thread src/store/bitpay-id/bitpay-id.effects.ts Outdated
Comment thread src/store/bitpay-id/bitpay-id.effects.ts Outdated
@cmgustavo cmgustavo force-pushed the guidepoint/feat/android-cookies-01 branch from 0e4a700 to 8ca086e Compare March 3, 2026 18:38
Copy link
Copy Markdown
Collaborator

@gabrielbazan7 gabrielbazan7 left a comment

Choose a reason for hiding this comment

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

ACK !

@JohnathanWhite JohnathanWhite merged commit 6db4ca9 into bitpay:master Mar 4, 2026
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.

4 participants