adafruit / adafruit/Adafruit_CircuitPython_OAuth2

Checking compatibility with service_account

Open
#4 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I have a service account enabled for google drive and sheets. I'm using the example sketch "Adafruit oauth2 test.py" with scopes = ["drive", "spreadsheets"] and the following (I have listed the equivalent key name from the service account JSON file):

secrets["google_client_id"] = "client_id"
secrets["google_client_secret"] = "private_key_id"

When I tried to run in ESP32S2, I could only get "KeyError: 'device_code'" so I brought into desktop python using normal requests library. I added a print statement before line 110 in Adafruit_oauth2.py to see what the response was and it is consistently:

- {'error': 'invalid_client', 'error_description': 'Invalid client type.'}

So I want to verify if adafruit_oauth2 is compatible with service accounts, and if it is, what should be used for "google_client_id" and "google_client_secret".

Thanks,

Nick

Contributor guide

No contributing guide indexed for this repository

Research direction

Read Adafruit_oauth2.py around line 110 and the “Adafruit oauth2 test.py” example, then compare the reported service-account inputs with the invalid_client response. Done means determining whether service accounts are supported, documenting the expected google_client_id and google_client_secret values, and addressing the reported device_code error if support is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
api, authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.