Skip to content

fix: update MFA endpoints from /otp/ to /challenge/ for WebToApp#67

Closed
mquandalle wants to merge 1 commit intoazerpas:mainfrom
mquandalle:fix/mfa-challenge-endpoint
Closed

fix: update MFA endpoints from /otp/ to /challenge/ for WebToApp#67
mquandalle wants to merge 1 commit intoazerpas:mainfrom
mquandalle:fix/mfa-challenge-endpoint

Conversation

@mquandalle
Copy link
Contributor

@mquandalle mquandalle commented Jan 7, 2026

My dear friend @claude one-shoted this, I confirmed that it works with my account

Summary

  • Update MFA workflow to use /session/challenge/ endpoint for WebToApp (instead of /session/otp/)
  • Add missing Content-Type: application/json header to MFA request POST
  • Update regex to match both otp and challenge paths for backward compatibility

Changes

  • Added api_path() method to MfaType enum:
    • Returns "otp" for Email/SMS
    • Returns "challenge" for WebToApp
  • Updated URL construction in request_mfa and submit_mfa
  • Added new test for challenge path extraction

Context

The Boursorama API has changed the MFA workflow. WebToApp MFA now uses /session/challenge/startwebtoapp instead of /session/otp/startwebtoapp.

Fixes #61

🤖 Generated with Claude Code

Boursorama API has changed the MFA workflow:
- WebToApp now uses /session/challenge/ instead of /session/otp/
- Added Content-Type header to MFA request POST
- Updated regex to match both otp and challenge paths
- Added new api_path() method to MfaType enum

Fixes azerpas#61

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mquandalle mquandalle marked this pull request as ready for review January 7, 2026 19:36
@azerpas
Copy link
Owner

azerpas commented Jan 7, 2026

Awesome work thanks a lot @mquandalle!

I've also tackled the issue for the past two evenings, and came up with something pretty similar to this and the handling of the additional QR code verification.

Let me merge my code to yours in the coming days and I'll merge this :)

EDIT: and thanks @claude!

@azerpas
Copy link
Owner

azerpas commented Jan 8, 2026

Merged the other PR, but made sure to add you as contributor. Thanks again!

@mquandalle
Copy link
Contributor Author

Didn't do much here, just prompted claude code but I was pleased to see it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix MFA handling

2 participants