outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
19 stars 10 forks source link

Could the authenticate user function be updated to accept a username and password #84

Open amishcode opened 2 years ago

amishcode commented 2 years ago

Hi - would it be possible to update the authenticateuser() function so that it accepts a username and password and passes those automatically to the GISAID site (I think this could be done by passing them in the GET request that's already there)? This would allow authentication to occur directly from the function call rather than by having to separately enter the credentials in a browser window that pops up - but I'm not sure if there is some other restriction/reason that would make that not allowed or undesirable.

Thanks, Amish

sinabahram commented 1 year ago

+1 to this ask. Understood if user/pass is not a best practice, but then is it please possible to download or copy/paste from the website an oAuth or similar token that can be used in code that must run in headless environments?

lenorakepler commented 1 year ago

I was able to run headless by installing and authenticating locally, then copying over the authentication token (.R_outbreak-info-token, located in the working directory) to the working directory on the cluster where I wanted the software to run.