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

Remove default value from all redirectUri parameters #155

Closed
bocops opened this issue Mar 3, 2023 · 1 comment · Fixed by #185
Closed

Remove default value from all redirectUri parameters #155

bocops opened this issue Mar 3, 2023 · 1 comment · Fixed by #185
Milestone

Comments

@bocops
Copy link
Collaborator

bocops commented Mar 3, 2023

We currently use urn:ietf:wg:oauth:2.0:oob as default parameter for a redirect URI both when first registering an app with an instance (AppMethods.createApp()) and when performing OAuth (multiple methods in OAuthMethods).

This URI is a special case in that it does not actually redirect anywhere (most likely to a URL that will be intercepted by the app starting the OAuth flow), but will just display a valid code in a browser window. This might be useful in some development contexts, but makes no sense for production code.

I already argued in #68 that we shouldn't use the URI in any sample code. I now think we should not use this URI as default parameter in any of the methods mentioned above, either, but instead make the library user explicitly define a redirect URI in every case. Keeping it as a default parameter might lead to hard-to-debug situations where an actually sensible parameter is omitted and authentication fails as a result of this.

This would not remove the possibility of using this URI, its use would just need to be made explicit - we could even define it as a constant for easy access, if considered useful.

@andregasser
Copy link
Owner

@bocops Lets change this.

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 a pull request may close this issue.

2 participants