When MODISoptions calla checkEarthdataLogin to test login/connectivity, it seems to pass the dlmethod and the MODISserverOrder:
if ((is.null(opt$EarthdataLogin) || isFALSE(opt$EarthdataLogin)) &&
check_earthdata_login) {
opt$EarthdataLogin = checkEarthdataLogin(opt$dlmethod,
opt$MODISserverOrder)
}
But the second argument to checkEarthdataLogin looks like it should be the .netrc file with the credentials in:
> MODIS:::checkEarthdataLogin
function (method = "auto", path = "~/.netrc")
{[etc]
Found this while chasing up a StackOverflow Q: https://gis.stackexchange.com/questions/462743/earthdata-log-in-error-for-downloading-modis-data-r-language - I'm not sure it answers their question though...