This pre-checks information provided to a high-level, user-facing auth
function, such as googledrive::drive_auth(), before passing the user's
input along to token_fetch(), which is designed to silently swallow errors.
Some users are confused about the difference between an OAuth client and a
service account and they provide the (path to the) JSON for one, when the
other is what's actually expected.
check_is_service_account(path, hint, call = caller_env())JSON identifying the service account, in one of the forms
supported for the txt argument of jsonlite::fromJSON() (typically, a
file path or JSON string).
The relevant function to call for configuring an OAuth client.
The execution environment of a currently running
function, e.g. call = caller_env(). The corresponding function
call is retrieved and mentioned in error messages as the source
of the error.
You only need to supply call when throwing a condition from a
helper function which wouldn't be relevant to mention in the
message.
Can also be NULL or a defused function call to
respectively not display any call or hard-code a code to display.
For more information about error calls, see Including function calls in error messages.
Nothing. Exists purely to throw an error.