pysnippet / fastapi-oauth2

Easy to integrate OAuth2 authentication with support for several identity providers.
https://docs.pysnippet.org/fastapi-oauth2
MIT License
49 stars 7 forks source link

refactor: Using public dynamic methods instead of static class constants #31

Closed frascuchon closed 6 months ago

frascuchon commented 7 months ago

Motivation:

Some backend implementations use the base methods authorization_url and access_token_url instead of the constant settings.

This PR makes a minimal change to support using method instead of class constants, which can be more flexible in some cases (for example the Auth0OAuth2which use the base domain to compound these urls)

All Submissions:

Changes to Core Features:

ArtyomVancyan commented 7 months ago

@frascuchon, I appreciate your interest and effort in contributing to the project, but as you can see, not all social-core backends implement the authorization_url and access_token_url methods that cause to initiation errors. If you can suggest an update that will consider that case, I would love to see it.

ArtyomVancyan commented 6 months ago

@frascuchon, currently closing the PR because of inactivity. Feel free to reopen in the future when you have other suggestions on this topic.