[ONB-2195] Validate pasted key prefix against --mode#51
Merged
FranciscaOtero merged 2 commits intoJun 3, 2026
Merged
Conversation
daleal
approved these changes
Jun 3, 2026
daleal
left a comment
Member
There was a problem hiding this comment.
Dejo approve, porque en verdad creo que no hay cómo arreglar lo del startsWith jajaja
daleal
reviewed
Jun 3, 2026
daleal
reviewed
Jun 3, 2026
Rename BrowserLoginMode to FintocMode and centralize it in src/types.ts so it can be reused across the login flow without coupling commands to the browser-login lib. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The paste fallback in fintoc login validated key format but not that the prefix matched --mode, leaving an inconsistent session. Add a local modeFromSecret helper and reuse the existing 'mismatch' handler so the user is hinted at the right --mode value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aa5868e to
43646cc
Compare
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.
Contexto
El paste fallback de
fintoc loginvalida el formato de la key pero no que su prefijo coincida con--mode, dejando una sesión inconsistente.Que hay de nuevo?
modeFromSecret(key) !== mode, reutilizando el handler demismatchque ya existe.modeFromSecretyFintocModeasrc/lib/secret.ts.Tests
Created with Claude Code
/create-prcommand