-
Notifications
You must be signed in to change notification settings - Fork 93
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
Support Dynamic Config #50
Comments
What you can do in the meantime is to create an event handler that return the event handler: export default eventHandler(async event => {
// get your config ...
const ghConfig = await getGHConfig(event)
return oauth.githubEventHandler({
config: ghConfig,
onSuccess(event, result) {
}
})(event)
}) |
Just chiming in; I'm also going to be using this workaround as I have a need for dynamic config. FWIW, if/when this supports gets implemented directly could consider rephrasing the |
Please checkout #277 (comment) for also another example |
Pull request is welcome to improve our error handling 💚 |
Sometimes we won't know ahead of time the exact config to use for an oauth request, it would be nice if we could provide
config
as a function that takes theevent
property.It's related to this issue: #48.
Bit edge case but I think it's a fairly simple change that provides much more flexibility.
The text was updated successfully, but these errors were encountered: