Parse a bloks login response. Extracts either a 2FA context token
(when the response redirects to two_step_verification) or the
login_response JSON literal (on success).
The redirect is the answer's screen push to the 2FA entrypoint: the app opens
that screen and sends its server_params on. The challenge context is the
two_step_verification_context those params name; an answer that pushes the
entrypoint but names none is not a recognisable hand-off.
Pure function — no IO, testable with fixture data.
Parse a bloks login response. Extracts either a 2FA context token (when the response redirects to two_step_verification) or the login_response JSON literal (on success).
The redirect is the answer's screen push to the 2FA entrypoint: the app opens that screen and sends its
server_paramson. The challenge context is thetwo_step_verification_contextthose params name; an answer that pushes the entrypoint but names none is not a recognisable hand-off.Pure function — no IO, testable with fixture data.