0
votes

I have an express.js application where clients authenticate using a local strategy (passport.js). After that I want them to be able to create empty documents with titles of their wish (I create a new mongoose 'Task' document and set its doclink (Task.doclink) to be the newly created document's public link (https://docs.google.com/document/d/...document_id.../edit)).

I want this new document to be created in a particular google account that I have access to (the clients don't have direct access to it but they can create documents inside it and write to it)

Any suggestions of how I should go about authorization of google API? As per my current research, this seems impossible.

1

1 Answers

0
votes

What I would recommend you to use is a service account as the docs say:

A service account is an identity that an instance or an application can use to run API requests on your behalf.

What it means is that you will be able to have a "bot user" in your express app, which could be the interface between your users and your document.

Docs

You can check more about it in these links: