Description Usage Arguments Value Examples
After a user logs in, check to see if they are on a whitelist
1 |
user_info |
the object returned by get_user_info |
whitelist |
A character vector of emails on whitelist |
TRUE if on whitelist or no whitelist, FALSE if not
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
options(googleAuthR.scopes.selected =
c("https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"))
googleAuthR::gar_auth()
## default is user logged in
user <- get_user_info()
the_list <- whitelist(user, c("your@email.com",
"another@email.com",
"yet@anotheremail.com"))
if(the_list){
message("You are on the list.")
} else {
message("If you're not on the list, you're not getting in.")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.