Create a GitLab OAuthProvider (via OIDC discovery)
Source:R/providers__research_enterprise.R
oauth_provider_gitlab.RdConfigure OIDC sign-in with GitLab.com or a self-managed GitLab instance.
Register an OAuth application on that instance, then pass its credentials
to oauth_client() with scopes = c("openid", "profile", "email").
Usage
oauth_provider_gitlab(
base_url = "https://gitlab.com",
name = "gitlab",
token_auth_style = NULL
)Arguments
- base_url
GitLab instance URL, including HTTPS and any deployment subpath. Defaults to
"https://gitlab.com".- name
Optional provider name (default
"gitlab").- token_auth_style
Authentication style for token requests: "header" (client_secret_basic), "body" (client_secret_post), or "public" (public client; send
client_idonly). The alias"none"is also accepted for"public". If NULL (default), it is inferred conservatively from discovery:"header"(client_secret_basic) is preferred, followed by"body"(client_secret_post), then"public"ifnoneis advertised and PKCE is enabled. Settoken_auth_style = "public"explicitly for a public client registration. JWT methods ("client_secret_jwt","private_key_jwt") and mTLS methods ("tls_client_auth","self_signed_tls_client_auth") must be selected explicitly. Seeoauth_provider()for the supported methods and their credentials.
Value
OAuthProvider object configured for GitLab.
Details
Supply only the scopes your app needs; "openid" is enough to request an
ID token. API and repository access require separate GitLab scopes.
See GitLab's OIDC guide.