1

I am creating two application : 1. Chrome extension for gmail. 2. It's IOS version

Now, since both the applications have same behavior and uses same google apis extensively, i decided to create a single project in google cloud platform for both. Now, when creating credentials, what will be my application type? I see both 'IOS' and 'Chrome App' under application type. Should i generate two Client IDs for chrome app and ios app?

To use single Client ID, i also tried creating a Node REST API (created a new project and set application type to 'web application' in google cloud platform) that will be used by both of my application to make request to google apis? But the authorization process includes, setting a callback url to get the authorization code and later use this code to get the access token. I guess this is not feasible for a REST API. Where should i keep the authorization part? In the application itself and later send the access token to my rest api? Is it possible?

I am very much confused about how should i start. Please could anyone suggest a better way to do this?

Mohit Maharjan
  • 79
  • 1
  • 3
  • 10
  • Haven't tried your use case yet, but read on [OAuth dance in Chrome Extension](https://developer.chrome.com/apps/tut_oauth#oauth-dance) and this SO post about [Is it possible to develop Google Chrome extensions using node.js?](https://stackoverflow.com/questions/12575965/is-it-possible-to-develop-google-chrome-extensions-using-node-js) . – ReyAnthonyRenacia Oct 08 '17 at 15:21

1 Answers1

0

I generated two client ids, one for ios and for the web. Isolating both applications is a good way to start. Both the apps generate their own token id, pass the id to Node Rest API and later the use that token to make a request to Google APIs.

Mohit Maharjan
  • 79
  • 1
  • 3
  • 10