R/default_auth.R

Defines functions default

default <- function(what) {

  href <- paste0("https://raw.githubusercontent.com/",
         "boettiger-lab/earthdatalogin/main/inst/.Renviron")
  tryCatch(readRenviron(href),
           warning = function(e) NULL)
  switch(what,
         user = Sys.getenv("EARTHDATA_USER", "earthaccess"),
         password = Sys.getenv("EARTHDATA_PASSWORD", "EDL_test1"))
}

Try the earthdatalogin package in your browser

Any scripts or data that you put into this service are public.

earthdatalogin documentation built on May 29, 2024, 3:36 a.m.