You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
(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 standardscope=
which applies to the bot user.This should be possible to do today by retrieving
OAuth2<C>
from managed state, callingOAuth2<C>::get_redirect()
, and then manually mangling theRedirect
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 beOAuth2<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.
The text was updated successfully, but these errors were encountered: