This function verifies if a user is authenticated to interact with the Meetup API by checking the existence of token cache files in the specified directory.
Usage
meetup_auth_status(
client_name = Sys.getenv("MEETUP_CLIENT_NAME", "meetupr"),
silent = FALSE
)
has_auth(client_name = Sys.getenv("MEETUP_CLIENT_NAME", "meetupr"))Value
logical. TRUE if a valid token
is found, FALSE otherwise.
If silent is FALSE, the function outputs status messages.
Details
The function checks the httr2 OAuth cache directory for encrypted
token files (.rds.enc) associated with the specified client. Based on
the results, it provides feedback about the authentication status. Multiple
tokens in the cache directory trigger a warning, while a missing token or
cache directory result in an error message.
Examples
if (FALSE) { # \dontrun{
# Check authentication status with default client name
status <- meetup_auth_status()
# Check authentication status with a specific client name
status <- meetup_auth_status(client_name = "custom_client")
# Suppress output messages
status <- meetup_auth_status(silent = TRUE)
} # }
