Skip to content

auth login -s people does not include contacts write scope #673

Open

Description

@StephaneEJ

Description

When using gws auth login -s people, the scope picker generates People API scopes for reading profiles, but does not include https://www.googleapis.com/auth/contacts which is required for write operations like createContact.

Steps to reproduce

  1. gws auth login -s people
  2. Approve scopes in browser
  3. gws people people createContact --json '{"names":[{"givenName":"Test","familyName":"Contact"}]}'

Expected: Contact is created.
Actual: 403 - Request had insufficient authentication scopes.

Workaround attempted

  • --scopes https://www.googleapis.com/auth/contacts works alone but cannot be combined with -s to get other service scopes in the same login.
  • --full does not include the contacts scope either.
  • Combining multiple full scope URLs in --scopes causes truncation in the OAuth redirect URL, resulting in invalid_scope errors.

Current workaround

Using curl directly with the People API and a dedicated refresh token obtained from a contacts-only gws auth login --scopes https://www.googleapis.com/auth/contacts.

Suggested fix

  1. Map -s people (or add -s contacts) to include https://www.googleapis.com/auth/contacts in the scope picker.
  2. Support incremental auth (adding scopes to an existing token without replacing it).

Environment

  • gws 0.22.5
  • macOS (Apple Silicon)
  • OAuth app in production mode (not testing)

Activity

  1. lautou commented on Sep 30, 2026

    @lautou

    Independent confirmation of the "incremental auth" gap named in the suggested fix here, from a different service pairing: had a working 25-scope grant (drive, gmail, calendar, docs, sheets, slides, tasks, contacts, plus identity scopes) on gws 0.22.5. Ran gws auth login -s forms to add Forms access for one new tool. Result, confirmed immediately via gws auth status: the stored credential dropped to 6 scopes total (openid/email/profile/cloud-platform only) — every other service's scope was gone, and Forms wasn't even among the survivors. -s <service> isn't just missing a scope mapping in some cases (as reported here) — more fundamentally, it never reads the existing grant before requesting a new one, so it replaces rather than unions. Had to recover with an explicit --scopes call listing all 25 scopes by hand. +1 on "support incremental auth" as the real fix — a per-service scope-completeness fix wouldn't have prevented what we hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions