I have a web application with a database on a VPS with Ubuntu. The idea is to save with the transfer of data that they charge, placing the images of the file of articles in Google Drive, where they do not charge for the transfer of data. However, I would have to connect to the Api Drive from the client browser with javascript, after the server serves the web page (without the images), and then load the missing images from GDrive.
Now, I have seen above the documentation of this API and you have to connect through an authentication process (OAuth) where you will have to supply a Customer-ID and a password, and it would not be safe to include it in the browser's javascript script . I have many doubts with all this and above all for safety. Is there another better way to do this?