login_oauth2: Login using OAuth 2.0 Authentication

View source: R/auth.R

login_oauth2R Documentation

Login using OAuth 2.0 Authentication

Description

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"
)

Arguments

authorize_url

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).

Value

No return value. Updates the internal state with the access token and additional details.

Author(s)

Khaled Al-Shamaa, k.el-shamaa@cgiar.org


icarda-git/QBMS documentation built on Sept. 25, 2024, 10:45 p.m.