authenticate: Set up authentication

View source: R/authenticate.R

authenticateR Documentation

Set up authentication

Description

Add an authentication slot to a query. That slot is then used by later code to determine whether to add an OAuth workflow. It is triggered automatically within capture() if the authenticate argument of galah_config() is set to TRUE, but only for occurrence queries to the Atlas of Living Australia. [Experimental].

Usage

authenticate(.data, cache_disk = FALSE)

Arguments

.data

An object of class data_request or metadata_request

cache_disk

(logical) Should JWT tokens be cached to disk? Defaults to FALSE

Value

An object of the same class as supplied, but with an added authenticate slot.

Examples

## Not run: 
# use `galah_config()` to set for all occurrence queries
galah_config(authenticate = TRUE)

x <- galah_call() |>
  identify("Wollemia nobilis") |>
  collect()

# use in-pipe for more control
x <- galah_call() |>
  identify("Wollemia nobilis") |>
  authenticate() |>
  collect()

## End(Not run)

galah documentation built on Feb. 11, 2026, 9:11 a.m.