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 extending of authorization endpoint parameters. #13

Closed
jebrosen opened this issue Feb 17, 2020 · 0 comments
Closed

Allow extending of authorization endpoint parameters. #13

jebrosen opened this issue Feb 17, 2020 · 0 comments
Labels
enhancement New feature or request noncompliant Issue is caused by a noncompliant provider

Comments

@jebrosen
Copy link
Owner

jebrosen commented Feb 17, 2020

(Split off from #11 (comment))

Some providers require or support additional parameters to be specified in the redirect request. One example is Slack, which has a second user_scope= parameter to specify scopes for the impersonated user in addition to the standard scope= which applies to the bot user.

This should be possible to do today by retrieving OAuth2<C> from managed state, calling OAuth2<C>::get_redirect(), and then manually mangling the Redirect URI. This is an unsavory option.

Perhaps it should be easier to add custom request parameters; something similar was done for TokenResponse (see #9 (comment)) to allow access to the exact data returned by the server. One option might be OAuth2<C>::get_redirect_custom(&self, cookies: &mut Cookies<'_>, scopes: &[&str], params: Params). Params would likely be an iterator of key-value pairs.

I would appreciate any further examples of providers that would benefit or require this functionality.

EDIT(2020-08-20): Removed mention of the automatically-generated login route, which was removed in 0.3.

@jebrosen jebrosen added enhancement New feature or request help wanted Extra attention is needed noncompliant Issue is caused by a noncompliant provider labels Feb 17, 2020
@jebrosen jebrosen removed the help wanted Extra attention is needed label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request noncompliant Issue is caused by a noncompliant provider
Projects
None yet
Development

No branches or pull requests

1 participant