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
This may just make sense to me, but I think it would be nice if auth_url (and potentially pkce and redirect_uri) could be included in auth_params. This would make oauth_client a self-contained object which is easier to pass around, especially in the context of multiple clients.
Current situation:
Currently, when using oauth_client(), auth_urlpkce and redirect_uri need to be specified separately in the flow:
Alternatively, one could have auth_url_auth_code and auth_url_device_code, but this feels more clunky. I think most users will rarely mix auth code and device code flows, but not sure here.
Context
I'm working on a PR draft for Shiny integration that supports multiple providers. During this process, I found it cleaner and more intuitive to provide a list of oauth_clients rather than managing parameters separately for each client. Fully understand there may be good reasons they are separate today.
The text was updated successfully, but these errors were encountered:
I'll contemplate this more when I'm next deep in OAuth, but my recollection that this is deliberate, in order to keep the parameters better matching the objects in the OAuth specs. (I also vaguely remember that httr lumped them altogether and that seemed like a bad idea once I understand OAuth better)
This may just make sense to me, but I think it would be nice if
auth_url
(and potentiallypkce
andredirect_uri
) could be included inauth_params
. This would makeoauth_client
a self-contained object which is easier to pass around, especially in the context of multiple clients.Current situation:
Currently, when using
oauth_client()
,auth_url
pkce
andredirect_uri
need to be specified separately in the flow:Proposed Change
Override arguments specified within
auth_params
of theoauth_client
object, so that the flow can be simplified:Caveats
The above example would of course break if you attempt a device flow:
Which could be overriden with:
Alternatively, one could have
auth_url_auth_code
andauth_url_device_code
, but this feels more clunky. I think most users will rarely mix auth code and device code flows, but not sure here.Context
I'm working on a PR draft for Shiny integration that supports multiple providers. During this process, I found it cleaner and more intuitive to provide a list of oauth_clients rather than managing parameters separately for each client. Fully understand there may be good reasons they are separate today.
The text was updated successfully, but these errors were encountered: