Performs OAuth 2.0 authentication by sending the user to the authorization URL and exchanging the authorization code for an access token. This function supports caching of tokens for subsequent requests.
Usage
login_oauth2(
authorize_url,
access_url,
client_id,
client_secret = NULL,
redirect_uri = "http://localhost:1410",
scope = NULL
)Arguments
The URL where the client is redirected for user authorization.
- access_url
The URL used to exchange an authorization code for an access token.
- client_id
The client ID (consumer key) provided by the authorization server.
- client_secret
The client secret provided by the authorization server (optional).
- redirect_uri
The URL where the user will be redirected after authorization (default is http://localhost:1410).
- scope
Scopes to be requested from the resource owner.
Author
Khaled Al-Shamaa (k.el-shamaa@cgiar.org)
