In gar_auth() the second check look for NULL or empty scopes.
As highlighted in #184, the second check (ie scopes != "") can be and actually is a vector of length greater than one. This could possibly lead to errors because only the first element would be considered.
This pull request purpose to solve the issue by wrapping that check into an any() call (ie, any(scopes != "")).
A test is also provided to check against this issue, all the other tests passed on my machine (Linux Debian 10, R 4.0.2, googleAuthR 1.3.0)
In
gar_auth()
the second check look forNULL
or empty scopes. As highlighted in #184, the second check (iescopes != ""
) can be and actually is a vector of length greater than one. This could possibly lead to errors because only the first element would be considered.This pull request purpose to solve the issue by wrapping that check into an
any()
call (ie,any(scopes != "")
).A test is also provided to check against this issue, all the other tests passed on my machine (Linux Debian 10, R 4.0.2, googleAuthR 1.3.0)