-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
compliance consolidation updates #527
Conversation
theseyi
commented
May 23, 2017
- removes obsolete confidential feature component sources
- fixes issue with tracking current user immediately after login: moves user tracking to index from application. adds session invalidation when retrieving the current user fails. slightly refactors logout
… user tracking to index from application. adds session invalidation when retrieving the current user fails. slightly refactors logout
@@ -1,7 +1,22 @@ | |||
import Ember from 'ember'; | |||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; | |||
import fetch from 'ember-network/fetch'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, looks like ember-fetch
is replacing ember-network
.
Based on conversations in miragejs/ember-cli-mirage#983, tomdale/ember-network#17 and mostly ember-cli/ember-fetch#21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Ember.$.get('/logout').then(() => { | ||
this.get('session').invalidate(); | ||
}); | ||
fetch('/logout').then(() => get(this, 'session').invalidate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this call ever fail? do we need a catch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the logout fails, at this point the user will remain on the page and will probably re-attempt to logout.