Skip to content

feat(auth): add OAuth PKCE browser flow#198

Merged
LorrisSaintGenez merged 13 commits intomainfrom
feat/oauth-auth
Mar 18, 2026
Merged

feat(auth): add OAuth PKCE browser flow#198
LorrisSaintGenez merged 13 commits intomainfrom
feat/oauth-auth

Conversation

@LorrisSaintGenez
Copy link
Contributor

@LorrisSaintGenez LorrisSaintGenez commented Mar 17, 2026

Summary

  • algolia auth login: Browser-based sign-in using OAuth 2.0 Authorization Code + PKCE
  • algolia auth signup: Same flow, but opens the sign-up page directly
  • algolia auth logout: Revoke the tokens, delete the one stored in the keychain
  • Token storage: Access/refresh tokens persisted in the OS keychain, with automatic refresh

Env. config

  • ALGOLIA_DASHBOARD_URL
  • ALGOLIA_API_URL
  • ALGOLIA_OAUTH_CLIENT_ID
  • ALGOLIA_OAUTH_SCOPE

Manual testing

Set those value above. If you use it with the local dashboard, set up also ALGOLIA_SEARCH_HOSTS if you want to test indices command.

  • ./algolia auth signup --> should prompt to create a new application (select CA or DE locally)
  • ./algolia auth login

@LorrisSaintGenez LorrisSaintGenez merged commit 6a437c3 into main Mar 18, 2026
3 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