googleapis / googleapis/google-api-nodejs-client

Proper sample for two-legged auth for service account and consume google resources in server side

Offen
#2,894 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
samples type: docs
Vorherrschende Sprache
TypeScript
Sterne
12.2k
Forks
2k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
24

Beschreibung

Can't find a proper example for using goolge services like calendar by using 2LO auth for service accounts.
Having difficulties authenticating the the app engine client (Showing invalid grant after using this
const auth = new google.auth.GoogleAuth({
scopes: ['https://www.googleapis.com/auth/calender', 'https://www.googleapis.com/auth/calendar.events', 'https://www.googleapis.com/auth/calendar.events.readonly', 'https://www.googleapis.com/auth/calendar.readonly', 'https://www.googleapis.com/auth/calendar.settings.readonly'],
}
auth.

Also when tried to manually create jwt tokens, always getting invalid signature, I feel the documentation for this @ https://developers.google.com/identity/protocols/oauth2/service-account is not clear enough to perform either manually or by using google libraries

Any help would be appreciated, thanks

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit der im Issue gezeigten GoogleAuth-Konfiguration und dem JWT-Flow für Service Accounts und prüfen Sie anschließend die verlinkte Google-Dokumentation zu OAuth für Service Accounts. Die Aufgabe ist abgeschlossen, wenn ein klares serverseitiges Beispiel für die zweibeinige Authentifizierung zur Nutzung von Calendar-Ressourcen bereitgestellt und die gemeldeten Fehler invalid-grant und invalid-signature geklärt wurden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js, typescript
Bereich
authentication, documentation
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.