Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current user not set to null when logout request fail #401

Open
2 tasks
inDream opened this issue Mar 9, 2018 · 0 comments
Open
2 tasks

Current user not set to null when logout request fail #401

inDream opened this issue Mar 9, 2018 · 0 comments

Comments

@inDream
Copy link
Contributor

inDream commented Mar 9, 2018

  • Skygear SDK Date/Version: 1.4.0
  • JS runtime: React Native
  • Skygear Server Date/Version: 1.4.0
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

skygear.auth.currentUser === null

Actual Results

skygear.auth.currentUser === prevUser

Steps to reproduce

  1. Login
  2. Call skygear.auth.logout() without network

Ref:

return this.container.makeRequest('auth:logout', {});
})
.then(() => {
return Promise.all([
this._setAccessToken(null),
this._setUser(null)
]).then(() => null);
})
.catch((err) => {
return this._setAccessToken(null).then(() => {
return Promise.reject(err);
});
});

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

No branches or pull requests

1 participant