Skip to content

Change logout methods to return a promise #684

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

Merged
merged 2 commits into from
Dec 26, 2016
Merged

Change logout methods to return a promise #684

merged 2 commits into from
Dec 26, 2016

Conversation

ryanclark
Copy link
Contributor

Checklist

  • Issue number for this PR: Suggestion: logout to return a promise #583 (required)
  • Docs included?: yes
  • Test units included?: no
  • e2e tests included?: no
  • In a clean directory, npm install, npm run build, and npm test run successfully? yes

Description

  • Change the AuthBackend.unauth() method to return the value of the _authBackend.unauth call
  • Change the FirebaseSdkAuthBackend.unauth() method to return a promise instead of void to match the API as suggested in Suggestion: logout to return a promise #583

Code sample

this.auth$.logout().then(() => {
  console.log('Logged out!');
});

@ryanclark
Copy link
Contributor Author

Yarn doesn't seem to be playing nicely with Travis which has led the build to fail - https://travis-ci.org/angular/angularfire2/builds/176247589

@katowulf
Copy link
Contributor

katowulf commented Dec 1, 2016

@davideast Travis error looks related to #611; ideas?

@ryanclark
Copy link
Contributor Author

@davideast is it possible to get this reviewed soon please? :)

@davideast
Copy link
Collaborator

@rynclark Thanks for getting this in!

@davideast davideast closed this Dec 26, 2016
@davideast davideast reopened this Dec 26, 2016
@davideast davideast merged commit 4630a86 into angular:master Dec 26, 2016
@lednhatkhanh
Copy link

lednhatkhanh commented Dec 30, 2016

Thanks, waiting for this to be merged!
Oh, I saw that it has been merged, how can I update angularfire 2 to have this function?

@ryanclark ryanclark deleted the auth-sign-out-promise branch December 30, 2016 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants