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 custom redirect_uri validator for AbstractApplication #490

Open
alvingonzales opened this issue Jun 19, 2017 · 1 comment
Open

Allow custom redirect_uri validator for AbstractApplication #490

alvingonzales opened this issue Jun 19, 2017 · 1 comment

Comments

@alvingonzales
Copy link

alvingonzales commented Jun 19, 2017

I'm trying to find a way to override the validator specified for AbstractApplication.redirect_uris model field, but I don't think there's actually a way for someone to do that in django?

Would it be possible instead to have this configurable in a setting so that i.e. validators.validate_uris() would instead use the function I might specify in the settings when validating the field?]

My main use case here is to allow specifying custom uri schemes for native apps (e.g. com.mycompany.app:/oauth2redirect, see https://developers.google.com/identity/protocols/OAuth2InstalledApp). And while I might be able to specify the schemes in ALLOWED_REDIRECT_URI_SCHEMES, it doesnt really give the flexibility I need.

For example, I might want to store allowed custom schemes in the database, or use a blacklist, or allow any scheme but the app needs to be reviewed before the credentials can actually be used. This would be helpful to have an api protected by django-oauth-toolkit to be a backend data store for native iOS/Android apps.

I could implement and make a PR for this, but I'm more thinking if this is actually a good idea, or if there's a better way of handling it.

@cleder
Copy link
Member

cleder commented Dec 20, 2019

see #443

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

No branches or pull requests

2 participants