docs(auth): clarify auth method copy for seat vs API key users - #37
Merged
Merged
Conversation
The 'Login with Berget' label implied SSO was available to all users, but OAuth requires a Berget Code seat. Make the /connect menu self-explanatory for both audiences: - OAuth: 'Log in with Berget AI (requires a Berget Code seat)' - API key: 'Use a Berget AI API key' Also guard the PKCE authorization URL build so a malformed BERGET_API_URL surfaces a clear error instead of a raw TypeError (new regression test included). Also fix a pre-existing import-sort lint error in auth.test.ts (eslint --fix only, no logic change).
- 'Log in with Berget AI (requires a Berget Code seat)' → 'Use Berget Code seat' - 'Use a Berget AI API key' → 'Use Berget AI API key' Shorter labels also sidestep the truncation concern in the /connect menu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
/connectmenu said "Login with Berget", which implied SSO was available to everyone — but OAuth requires a Berget Code seat. Users without a seat had to know to pick API keys instead. This makes the menu self-explanatory for both audiences.Changes
Auth method labels (
src/plugin.ts):Login with Berget→Log in with Berget AI (requires a Berget Code seat)Enter Berget API Key manually→Use a Berget AI API keyDocs updated to quote the new labels:
README.md,CONTRIBUTING.md,docs/auth.md(including the mermaid diagram).Fix (
src/plugin/pkce-flow.ts): guard the PKCE authorization URL build — a malformedBERGET_API_URLnow surfaces a clear error message instead of a rawTypeError: Invalid URL.Chore: pre-existing import-sort lint error in
auth.test.tsfixed viaeslint --fixonly (no logic change), sonpm run lintis green.Test plan
npm test— 58/58 pass (1 new test: invalid Keycloak URL rejects with clear error)npm run typecheck,npm run lint— cleanprettier --check— cleanopencode→/connect→ confirm both labels render fully (OAuth label is ~54 chars)