Skip to contents

Automatically selects and executes the appropriate authentication method:

  1. OIDC token if the realm's OIDC env var is set

  2. API key if the realm's API key env var is set

  3. OAuth2 if in an interactive session

This function does not need to be called by the user to login. It is called automatically by other functions in the package.

Usage

auth_login(realm = "counts")

Arguments

realm

Character. The realm to authenticate against (default "counts"). counts authenticates first whichever realm you name, and the named realm is then served from that credential.

See also

auth_logout() to end a session, auth_me() to inspect the current user, auth_validate() to validate a token

Examples

if (FALSE) { # \dontrun{
auth_login()
auth_login(realm = "telemetry")
} # }