Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow providerParams to be a method invoked with the request #233
This allows provideParams to be a method which, when invoked with the request object, returns query parameters to add to the request.
For certain OAuth servers which include additional metadata in the request (for us: Discord's OAuth system) it's sometimes desirable to be able to selectively request features depending on configuration in the auth request.
You're missing the documentation for the scope parameter.
Also, under Advanced Usage, would you mind adding a section describing/showing an example on how to do that for scope and providerParams.
Otherwise, it looks good to me. I was debating if we should try/catch around the user code... We could show a nice error message and throw back the original exception but I am not 100% positive that's worth it. If anybody has an opinion that it should, do speak up! :)