-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introducing Ember-Simple-Auth For Token Authentication #9
Conversation
// I'm doing this to tap-dance around how my parent classes use this | ||
if ('boolean' === typeOf(isInvalidateServerSide) && isInvalidateServerSide) { | ||
this.invalidateServerSide(get(sessionData, this.tokenPropertyName)); | ||
} |
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.
This needs to be fixed. This is javascript hack-101. #2
*/ | ||
handleAccessTokenExpiration() { | ||
return this.invalidate().then(() => { | ||
// this.trigger('sessionDataInvalidated'); |
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.
Fix this shit #3
export default Controller.extend({ | ||
actions: { | ||
logout(session) { | ||
session.invalidate(true, session.get('data.authenticated')); |
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.
Puke. #2 to the rescue. I hope.
this.transitionToRoute('protected.index'); | ||
}, () => { | ||
console.error('Failed to authenticate.'); | ||
// TODO - present a message for failed authentication |
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.
Captured in #1
</div> | ||
</section> | ||
</nav> |
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.
What a simple and active NAVBAR! So good. Look at how the Login button changes accordingly and highlights nicely when you're on the login page. Love it.
No description provided.