Whether or not you wish to use Gadget's developer OAuth credentials, these credentials are only intended for quick setup in your Development environment, and should be updated before you deploy your app to Production.
If you also wish to add additional scopes, you will need to set up your own credentials as well.
To obtain your own Google OAuth credentials, you'll need to create a project in the Google Cloud Console and configure the OAuth consent screen. Then, you can generate OAuth client credentials (Client ID and Client Secret) for your Gadget app and enable them. Follow these steps to get started:
Create a Google Cloud Project:
- Go to the Google Cloud Console: https://console.cloud.google.com/
- Click on the project dropdown at the top of the page, and then click New Project.
- Follow the prompts to give your project a name. Click Create to create the project.
Configure OAuth Consent Screen:
- In the Google Cloud Console, go to APIs & Services > OAuth consent screen.
- Choose the External user type and click Create.
- Provide a name for your application.
- Optionally, fill out other required information.
- Add the necessary scopes your application needs access to.
- Save the changes.
Create OAuth Client Credentials:
- Go to APIs & Services > Credentials.
- Click Create Credentials and select OAuth client ID.
- Choose the application type (Web application, Android, iOS, etc.).
- Provide the necessary details for the chosen application type, such as redirect URIs.
- Click Create to generate the OAuth client credentials (Client ID and Client Secret).
Use OAuth Client Credentials in your Gadget application:
- Copy the obtained Client ID and Client Secret from the Google Cloud Console access tokens on behalf of the user.
- Head back over to your Gadget application, and navigate to Settings and then click on Environment variables.
- Paste your credentials within the
GOOGLE_CLIENT_IDsection in the appropriate input of Development or Pending Deploy (dependant on your use case).