Skip to content

feat(card): switch Baanx login to OAuth code [PERA-4349]#943

Draft
yasincaliskan wants to merge 2 commits into
mainfrom
yasincaliskan/PERA-4349
Draft

feat(card): switch Baanx login to OAuth code [PERA-4349]#943
yasincaliskan wants to merge 2 commits into
mainfrom
yasincaliskan/PERA-4349

Conversation

@yasincaliskan

Copy link
Copy Markdown
Collaborator

Description

  • OAuth flow: PKCE (verifier + S256 challenge, RFC 7636-tested) and CSRF state; initiate + code exchange via the Pera backend proxy, login/authorize/ refresh direct to Baanx. If the exchange fails, login degrades to the old
    refresh-less 6h session instead of failing.
  • 2FA: new POST /v1/auth/login/otp support — the sign-in screen now requests the code on isOtpRequired and resends via the endpoint instead of re-running login.
  • Registration: the address-finalize step runs the same exchange, so new users get refresh tokens too.
  • Transport: 401→refresh interceptor keys on authenticated calls; card proxy requests attach the app-integrity token, or the staging bypass header on non-production builds.
  • Cleanups: toUrlSafeBase64 consolidated into shared, getValidIntegrityToken extracted into app-integrity (reused by fee-delegation).

Related Issues

Checklist

  • Have you tested your changes locally?
  • Have you reviewed the code for any potential issues?
  • Have you documented any necessary changes in the project's documentation?
  • Have you added any necessary tests for your changes?
  • Have you updated any relevant dependencies?

@yasincaliskan

yasincaliskan commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

It'll be ready for testing when we add INTEGRITY_BYPASS_ENABLED=true into staging backend
cc: @kadircancetin

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.

1 participant