Skip to content

feat: add OAuth login by instance - #25

Merged
barkz merged 1 commit into
barkz:mainfrom
alex-mahabir-glean:feat/oauth-login
Aug 21, 2026
Merged

feat: add OAuth login by instance#25
barkz merged 1 commit into
barkz:mainfrom
alex-mahabir-glean:feat/oauth-login

Conversation

@alex-mahabir-glean

Copy link
Copy Markdown
Contributor

Summary

  • Add /login <hostname-or-instance-id> OAuth login
  • Use DCR and PKCE without requiring a static bearer token
  • Normalize instance IDs to Glean backend hostnames
  • Update the getting-started guide and authentication docs

Validation

  • python3 -m unittest discover tests
  • python3 -m pytest -q tests
  • git diff --check

@rob-barker-glean

Copy link
Copy Markdown

Thanks @alex-mahabir-glean — this fixes an issue that causes problems on first run.

/login acme resolving to acme-be.glean.com is the headline. The -be convention is one of those things you only know if someone tells you. With DCR + PKCE alongside it, you can now go from a fresh clone to a live session without obtaining a token first.

Two things I appreciated: normalize_instance_host preserves full hostnames and URLs instead of assuming everything is a bare instance ID, so custom tenants and dev setups keep working — and it returns None on malformed input rather than guessing a plausible-looking wrong hostname. Tests and docs in the same PR as well. Thx

@barkz
barkz merged commit 521d174 into barkz:main Aug 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants