Repository navigation
fix: remove access token logging from examples - #244
volcano-staging[bot] wants to merge 1 commit into
Conversation
Volcano LavaFlow run 776d2b79-f766-4b18-becf-06b2b57226a0.
|
|
There was a problem hiding this comment.
LavaFlow is reviewing this draft at c345fe1. Findings appear inline where the pull-request diff permits. See the run details for the complete review.
After the token log is removed, the sign-up example still destructures session from signUp() but never uses it. Readers may wonder why it is there. Suggested change: Destructure only what the example uses: const { user } = await volcano.auth.signUp({...}).
After removing the token log, the SDK signup example still destructures session from signUp() but never uses it, leaving a dangling variable in the snippet readers copy. The original line also carried the only note that the token is applied to queries automatically. Suggested change: Either destructure only { user } or keep a short comment such as // session tokens are stored and sent on queries automatically so the unused binding is explained.
|
LavaFlow won't merge this fix; it needs a person. Why:
Review it, then merge or close it. LavaFlow won't push to, update, or merge it again. LavaFlow run |
AI review: no P0-P2 findingsDocs-only change: the JavaScript examples in four pages now log a user ID, whether a session exists, or a short success message, where they used to print access tokens or whole session objects. The edits are correct and low risk. I searched the rest of ⚪ P3
🟣 Pre-existing
Not checked: The AI review read the diff, the code, and the PR's text; it ran no tests or builds and read nothing outside this repository. Human review: not needed |
| @@ -46,7 +46,7 @@ if (error) { | |||
| } | |||
|
|
|||
| console.log('User created:', user.id); | |||
There was a problem hiding this comment.
🟣 Pre-existing: Sign-up quickstarts assume signUp returns a user and session, but content/sdk/js/authentication.md says it does not
content/sdk/js/authentication.md:47 says sign-up is session-less: it returns no user and no session unless signInWhenAllowed: true is passed. The authentication quickstart (here) and the database quick-start (content/platform/databases/quick-start.md:56) call signUp without that option and then read user.id. A reader following them gets a TypeError on a null user. The JSON block below this example also shows a session with tokens in the sign-up response. This PR rewrites the lines next to these but did not introduce the problem. A follow-up should add signInWhenAllowed: true or sign in before reading user.
Found by claude-opus-5-5
Summary
For VOL-1831: the code examples no longer print bearer or refresh tokens. The access-token logs in the database quick-start, the authentication quickstart and the SDK refresh example now log a user ID, a check of whether a session exists, or a refresh success message. Full session objects in the JavaScript SDK error-handling examples are no longer logged. Authorization headers and SDK calls are unchanged.
Requested change. Implements the reporter's request.
Choices to confirm. This fix decides behavior beyond stopping the error. Read each choice with
volcano cloud lavaflow show 776d2b79-f766-4b18-becf-06b2b57226a0 --jsonand confirm it before you merge.Reviewer observations. LavaFlow's reviewers left 3 observations that don't hold this fix. Read them with
volcano cloud lavaflow show 776d2b79-f766-4b18-becf-06b2b57226a0 --json.Verification. Check the run details for recorded checks and this pull request for GitHub CI results. A test added or changed is not a claim that it passed.
An AI model wrote this change from a report and the repository files at a verified revision. The repository's configured CI can run on this pull request. A person reviews and merges this change.
LavaFlow run
776d2b79-f766-4b18-becf-06b2b57226a0. Run details.