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

Fix authentication client logout function to guard against null #1319

Merged

Conversation

KidkArolis
Copy link
Contributor

Fixes #1318

@KidkArolis KidkArolis force-pushed the fix-authentication-client-logout branch from 889fcd7 to 67d9cbc Compare May 2, 2019 11:13
@daffl
Copy link
Member

daffl commented May 4, 2019

I think this fix makes sense I'm just wondering why this was happening because this.app.get('authentication') should only be undefined if you are not logged in.

@daffl daffl merged commit fa7f057 into feathersjs:master May 4, 2019
@KidkArolis
Copy link
Contributor Author

Ah, I see, thats right. Maybe it was related to some other auth issues i was experiencing. I will double check.

@KidkArolis
Copy link
Contributor Author

Yeah, when I call logout, the authentication is indeed defined. The reason it was undefined previously is possibly related to the other issues where I would succesfully authenticate, but then jwt strategy would not work for me logging me out. Hm.. or maybe I was just calling logout while being logged out expecting that not to throw.

In any case, can't hurt to guard, I guess. Good to know it's all working fine.

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

Successfully merging this pull request may close these issues.

[Feathers 4.0.0-pre] Clientside app.logout() is not working
2 participants