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

Merged
merged 3 commits into from
Apr 3, 2018
Merged

Fix No Token exception when tokenRequired is set to false #118

merged 3 commits into from
Apr 3, 2018

Conversation

SkyLeite
Copy link
Contributor

@SkyLeite SkyLeite commented Apr 3, 2018

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

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SkyLeite
Copy link
Contributor Author

SkyLeite commented Apr 3, 2018

I don't understand, can you elaborate?

@pi0
Copy link
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)) {
...
}

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

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.

2 participants