Skip to content

Commit

Permalink
Fix missing commerce-sdk-react logout call (#1180)
Browse files Browse the repository at this point in the history
* add logout call

* void not awaited promise
  • Loading branch information
kevinxh authored May 10, 2023
1 parent 9e4f23d commit 65ac429
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/commerce-sdk-react/src/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,11 @@ class Auth {
*
*/
async logout() {
// TODO: are we missing a call to /logout?
// Ticket: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00001EFF4nYAH/view
// Not awaiting on purpose because there isn't much we can do if this fails.
void helpers.logout(this.client, {
accessToken: this.get('access_token'),
refreshToken: this.get('refresh_token_registered')
})
this.clearStorage()
return this.loginGuestUser()
}
Expand Down

0 comments on commit 65ac429

Please sign in to comment.