fix: return full ChallengeResponse in requestSignInLink#255
Conversation
4afca40 to
9cd6aab
Compare
|
Thank you! |
AI Code Review - PR #255Verdict: ✅ APPROVED - This change does not break any functionality in the codebase. What This ChangesThis PR modifies requestSignInLink to return the full ChallengeResponse object instead of just the session string, enabling access to ChallengeParameters from AWS Cognito's challenge response (addressing issue #252). Impact Analysis✅ Internal Code - No Breaking Changes:
✅ Backward Compatible: The session is still accessible via response.Session: const { signInLinkRequested } = requestSignInLink({ username });
const response = await signInLinkRequested;
const session = response.Session; // Session still accessibleOnly affects external consumers if they directly use the resolved value as a string: // Would need update:
const session = await signInLinkRequested;
console.log(session.substring(...));
// Fix:
const response = await signInLinkRequested;
console.log(response.Session.substring(...));Recommendations Before Merge
SummaryThis is a valuable enhancement that properly exposes AWS Cognito's publicChallengeParameters feature. The change is minimal, well-targeted, and safe for all internal code. The exported ChallengeResponse interface also improves TypeScript type safety for consumers. |
*Issue #252