Two-factor authentication in mobile apps: what does the financial sector require?

In a financial services mobile app, login is a legal and architectural decision: PSD2 requires strong customer authentication (SCA) with concrete rules (max. 5 failed attempts, 5 minutes of inactivity, a code linked to the amount). Here is what to clarify before development, and how we solved it with Keycloak-based two-factor authentication in a real project.

László Behán, Managing Director, FrontX | Reading time: 8 minutes

October 16, 2026

Two-factor authentication in a financial services mobile app

In an e-commerce app, login is a question of a username and a password. In a financial services mobile app, the same question is a legal, regulatory and architectural decision all at once. This is not overcomplicating things, it is reality: underestimate it at the start of the project, and you pay for it halfway through, in lead time and in money.

In brief

  • PSD2 requires strong customer authentication (SCA): for payments and online account access, at least two independent factors are needed (knowledge, possession, inherence).
  • The EU regulation on SCA is very specific: no more than 5 failed attempts, no more than 5 minutes of inactivity, and a code linked to the amount and payee of the payment.
  • The rule is the same everywhere, but the detailed rules differ from company to company, and they make up a large part of the development work.
  • Authentication has to be decided on day one of architecture design, not at the end of development.

What does PSD2 strong customer authentication (SCA) require?

The PSD2 directive (Payment Services Directive 2) introduced strong customer authentication (SCA) in the EU. In everyday language, this is two-factor authentication (2FA). The customer has to prove their identity with elements from at least two independent categories:

  • Knowledge: something only the user knows (password, PIN).
  • Possession: something only the user has (the registered phone, a hardware token).
  • Inherence: something the user is (fingerprint, face recognition).

Under the directive, SCA is required when the customer accesses their payment account online, initiates an electronic payment, or carries out any action through a remote channel that may imply a risk of fraud. The details are set out in Delegated Regulation (EU) 2018/389 (the RTS), and they directly shape how the mobile app works:

  • No more than 5 consecutive failed authentication attempts are allowed, after which access must be blocked temporarily or permanently.
  • After successful authentication, no more than 5 minutes of inactivity are allowed before the session expires.
  • Dynamic linking: for payments, the authentication code must be linked to the specific amount and payee. If either changes, the code becomes invalid.
  • Independence of the factors: a breach of one factor must not compromise the other. If the phone is both the possession factor and the device used for authentication, the app must use a separated secure execution environment on the device.
  • For account information access, strong authentication has to be repeated at least every 180 days since 25 July 2023 (previously every 90 days).
Important: PSD2 applies to payment services. For an insurance or investment app, it is not this law that directly requires two-factor authentication, but the DORA regulation, applicable since 17 January 2025, expects every financial entity to have policies on strong authentication mechanisms. In practice, this is the expected level for non-payment apps as well.

Same rule, different details in every company

Seen from above, two-factor authentication is the same everywhere. In reality, every organisation has its own rules, and compliance teams have room for interpretation. Some typical decision points where, in our experience, the rules differ between companies:

  • After how many logins does the user have to enter their PIN or password again instead of using biometrics?
  • What is the protocol at first login, and how does the customer register their device?
  • Does the customer have to enable biometric authentication explicitly, or is it on by default?
  • For which transactions is biometric authentication not accepted?
  • What exactly happens when a password expires?

These look like small details, but technically each one is a separate task. In our experience, the rules also need plenty of fine-tuning after go-live, based on real-world use.

The typical mistake: authentication as an afterthought

We often see this pattern: development starts with the user interface and the business logic, and authentication goes in "at the end". In a simple app, that works. In a financial services mobile app, it can mean redesigning the architecture at the end of the project, at the most expensive point.

The reason is simple: strong customer authentication does not only appear at login, but in every sensitive operation - initiating a transaction, changing a limit, updating personal data. If this is not thought through, the question "where do we need to re-authenticate?" comes up again for every feature, and leads to inconsistent solutions.

"At the end" often just means that the details are not discussed up front because they do not seem important. With a third-party module, however, it matters a great deal exactly how authentication works and with which technical parameters: sometimes the module simply does not allow certain approaches. Changing this later can add lead time comparable to the whole project.

From a real project: Keycloak-based two-factor authentication

For a financial services provider's customer-facing mobile app, we implemented two-factor authentication with Keycloak-based identity and access management (IAM).

Why Keycloak?

Keycloak is an open-source yet enterprise-grade identity management solution: there is no licence cost, and its functionality meets the expectations of the financial sector. It natively supports time-based one-time passwords (TOTP): alongside their password, the user enters a code generated by an authenticator app (e.g. Google Authenticator). The client favoured this direction, and we consider it a good choice too: it provides a stable technical foundation, and expertise and documentation for it are available on the Hungarian market. That is often a more important factor than the technical parameters.

How does it work in practice?

  1. At first login, the user registers their authenticator app - this is the possession factor.
  2. At every login, the user enters the current time-based code alongside the password (the knowledge factor).
  3. For critical operations, such as initiating a transaction, the system asks for the second factor again, based on configurable conditions.
  4. For a better customer experience, we also enabled biometric authentication.

The architectural advantage

Keycloak does not only handle authentication, it also centralises authorisation. The "who can see and do what" logic is therefore not scattered across the application code but managed in a central, auditable system. For a financial institution this is a critical advantage: during an audit, access management is far easier to demonstrate and evidence.

A further advantage is that Keycloak can be run as separate core infrastructure, overseen by an operations team independently of the development team. In our view, this is a healthy division of work and responsibility. From the application's perspective, it is a callable "black box" that does not have to be hard-coded into the codebase.

What we learned during development

User experience and security are in tension - and that tension has to be managed. Every extra authentication step adds friction. The answer is not less security but a risk-based approach: a simpler flow for low-risk operations (e.g. viewing a balance), a stricter one for high-risk operations (transactions, limit changes).

Biometric authentication is a good complement, not a replacement. A fingerprint or face recognition is convenient, but linking biometric data stored on the device with server-side authentication needs careful design. It is not a "just switch it on" feature: every detailed rule has to be defined precisely, up front.

The recovery process is just as critical as authentication itself. What happens if the user loses the phone running the authenticator app? Without a well-thought-out, secure process, customer service will have to solve it - often at the cost of security compromises.

Checklist: what to clarify before development

  • Which operations require strong customer authentication, and where do we ask for the second factor again (step-up)?
  • Which factor combinations do we accept (password, PIN, TOTP, biometrics, device binding)?
  • How do we handle failed attempts (max. 5) and inactivity (max. 5 minutes)?
  • Do we need dynamic linking, i.e. binding the code to the amount and the payee?
  • What are the company's own detailed rules on biometric authentication and password expiry?
  • How do first registration and device replacement work?
  • What is the recovery process for a lost or replaced phone?
  • What does the third-party module allow, and who operates the identity management system?

What we do differently at FrontX

  • In financial services mobile app development, authentication architecture is among the first design steps, not the last.
  • We take compliance requirements (PSD2, strong customer authentication) into account already in the wireframe and API design phases.
  • We document the company-specific detailed rules through business analysis before development, so they do not surface mid-build.
  • We verify authentication flows, failed attempts and recovery with dedicated test scenarios.

Our insurance mobile app case study covers similar challenges, where we built on the existing two-factor authentication.

If you are about to develop a financial services mobile app and the authentication architecture is still an open question, we are happy to help you think it through: book a free consultation.

Frequently asked questions

What is strong customer authentication (SCA)?

Strong customer authentication means that for payments or online account access, the customer has to be identified with at least two independent factors: something they know (password, PIN), something they have (phone, token) or something they are (fingerprint, face). In the EU it is required by the PSD2 directive and Delegated Regulation (EU) 2018/389.

Is two-factor authentication mandatory in insurance or investment apps?

PSD2 applies to payment services, so it does not directly require it in an insurance or investment app. However, since 17 January 2025 the DORA regulation expects every financial entity to have strong authentication policies, so in practice this is the expected level for these apps too. If a payment is initiated from the app, the PSD2 rules apply to the payment step.

Is biometric authentication enough in a financial mobile app?

Not on its own: biometrics is a single factor. However, if the phone is registered and bound to the app as the possession factor, biometric authentication can be the second factor alongside it. For this, the regulation expects a separated secure execution environment and independence of the factors.

Why use Keycloak?

Keycloak is an open-source, enterprise-grade identity and access management solution with no licence cost. It natively supports TOTP-based two-factor authentication and centralises authorisation, which is a significant audit advantage over scattered, custom solutions. Expertise and implementation experience for it are also available on the Hungarian market.

When should the app ask for the second factor again?

We recommend a risk-based approach: for low-risk operations (viewing a balance) authentication at login is enough, for high-risk ones (initiating a transaction, changing a limit) it is worth asking again. This is a business decision: every organisation has to set its own two-factor authentication rules, within the legal minimums.

László Behán is Managing Director and Co-Founder of FrontX Kft. He was previously CIO of Signal Biztosító, Head of Development and Data Warehousing at Groupama Biztosító, and a member of the Board of LeasePlan Hungaria as Operations Director. He has 25 years of IT and business leadership experience in financial services. LinkedIn profile

Szoftverfejlesztők csapatmunkában

Let's talk about your project

If this article reflected your own situation, let's talk it through. A free, no-obligation consultation with concrete recommendations.
Book a free consultation