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

Allow providers params to be overloaded from nuxt.config.js #77

Merged
merged 1 commit into from
Mar 5, 2018

Conversation

syffs
Copy link
Contributor

@syffs syffs commented Feb 27, 2018

userinfo & scope would need to be alterable.

@syffs syffs mentioned this pull request Feb 27, 2018
// Apply provider
if (ctx.providers[strategy._provider]) {
ctx.providers[strategy._provider].call(this, strategy, ctx)
}

// _scheme property
Copy link
Member

Choose a reason for hiding this comment

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

Why should we move this line after provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise when _scheme is not defined in nuxt.config.js for a strategy, it is defaulted to the strategy._name before provider default params are assigned, resulting into provider._scheme value not being applied (since it's supposed to be a default value).
Since strategy._name usually does not refer to an existing scheme, it breaks the module.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for provided reasons. Seems reasonable :)

@pi0 pi0 merged commit 8542959 into nuxt-community:dev Mar 5, 2018
@syffs syffs deleted the ext/providers branch March 5, 2018 17:16
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