This line works locally because is sourcing a local file with your API key and secret, but that file doesn't exist in the shinyapps.io server, you would have to log by other method like drive_auth()
Thanks @woodward, i've came across that article. But the library 'googlesheets' don't work for me in my local environment, which is why I opt for 'googledrive' instead.
I don't think 'googledrive' allows modifying files remotely.