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 No Token exception when tokenRequired is set to false #118

Merged
merged 3 commits into from Apr 3, 2018

Conversation

Projects
None yet
2 participants
@RodrigoLeiteF
Contributor

RodrigoLeiteF commented Apr 3, 2018

This is a fix for the following issue: https://nuxtjs.cmty.io/nuxt/docs/issues/c84

@pi0

Thanks for the PR. While I agree about the bug, it may be better we don't assume anything about scheme options handling in the core.

@RodrigoLeiteF

This comment has been minimized.

Contributor

RodrigoLeiteF commented Apr 3, 2018

I don't understand, can you elaborate?

@pi0

This comment has been minimized.

Member

pi0 commented Apr 3, 2018

@Kxze strategy.options and tokenRequired are things specific to the schemes but we validating options outside of scheme. (What if a scheme doesn't set options on itself?)

Maybe it would be better to merge it with L250 and totally remove Promise.reject line:

if (!_endpoint.headers['Authorization'] && isSet(token)) {
...
}
@pi0

pi0 approved these changes Apr 3, 2018

Thank you!

@pi0 pi0 merged commit 56265a7 into nuxt-community:dev Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment