← Plaid Interview Insights

Plaid·Frontend Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

System design round at Plaid for a frontend engineer role, focused entirely on designing something like Plaid Link itself. Pretty meta. The question was dense and covered a lot of ground, from iframe embedding all the way to token storage and PII isolation.

Questions Asked (4)

Q1

Design a third-party embeddable widget (similar to Plaid Link) that lets users connect their bank accounts to a partner application. Cover the iframe embed model, the API surface, OAuth and credential flows, the data model, security considerations, and how the partner app fetches account data server-to-server.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This is basically six questions in a trenchcoat.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the widget as a secure, isolated iframe that handles sensitive bank authentication, then walk through the end-to-end flow from initialization to data retrieval. Emphasize the separation of concerns: the partner app never touches credentials, and all sensitive operations happen within the iframe or server-to-server.

Pro tip: Highlight that the iframe should be served from a dedicated domain with strict CSP and sandbox attributes, and that the parent app communicates via postMessage with origin validation. This shows you understand both security and cross-origin communication nuances.

1. Define the embed model and initialization

Explain how the partner app includes the widget via a script tag that creates an iframe, and how it passes configuration (e.g., public token, environment) securely. Mention the need for a lightweight SDK that handles iframe creation and postMessage communication.

2. Design the API surface and OAuth flow

Outline the server-to-server API endpoints for creating link tokens, exchanging public tokens for access tokens, and fetching accounts. Describe the OAuth redirect flow within the iframe, including handling redirects and deep links back to the partner app.

3. Detail the data model and state management

Describe the key entities: institutions, accounts, transactions, and items (connections). Explain how the widget manages state during the flow (e.g., institution selection, credential entry, MFA) and how it communicates success or failure to the parent.

4. Address security and compliance

Cover iframe sandboxing, CSP, origin validation for postMessage, token scoping, encryption, and never exposing credentials to the parent. Mention compliance standards like SOC 2 and how they influence design.

5. Explain server-to-server data fetching

Describe how the partner backend uses the access token to call Plaid's API to retrieve account and transaction data, and how it handles webhooks for updates. Emphasize that the frontend never directly accesses sensitive data.

Key Points to Mention

  • Iframe isolation with sandbox attributes and strict CSP to prevent XSS and clickjacking.
  • Secure cross-origin communication using postMessage with origin checks.
  • OAuth 2.0 flow with redirect URIs and handling of MFA challenges within the iframe.
  • Token exchange: public token from client to server, exchanged for access token server-side.
  • Data model: items, accounts, transactions, and institutions with relationships.
  • Server-to-server API calls for fetching data, with webhooks for real-time updates.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle step-up authentication and MFA within the bank credential flow, including how redirects are managed between the bank, your backend, and the embedded widget?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This came as a follow-up and I wasn't fully prepared for the redirect sequencing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the flow: the bank's OAuth redirects to your backend, which then hands off to the embedded widget via a secure token. Explain how you handle step-up authentication by detecting the challenge, pausing the widget, and orchestrating a redirect to the bank's MFA page, then resuming the flow. Emphasize security (state, PKCE, token binding) and user experience (minimal disruption, clear messaging).

Pro tip: Highlight that you never expose bank credentials or MFA codes to the widget or frontend—only the backend handles sensitive data, and the widget uses a short-lived, scoped token. Also mention that you design for failure: if the redirect back fails, you provide a fallback to restart the flow gracefully.

1. Clarify the flow and actors

Describe the three parties: bank (OAuth provider), your backend (orchestrator), and embedded widget (frontend). Explain that the backend initiates the OAuth flow and the widget is loaded with a session token.

2. Handle initial authentication and redirects

Explain how the bank redirects to your backend callback with an authorization code, which is exchanged for tokens. The backend then redirects to the widget with a secure, short-lived token, ensuring no sensitive data is exposed.

3. Detect and manage step-up authentication

Describe how the backend detects when the bank requires MFA (e.g., via error response or webhook). The widget is paused, and the user is redirected to the bank's MFA page, with state preserved to resume the flow.

4. Resume the flow after MFA

After MFA completion, the bank redirects back to your backend, which validates the response and issues a new token to the widget. The widget resumes from where it left off, providing a seamless experience.

5. Address security and edge cases

Mention security measures like state parameters, PKCE, token binding, and CSRF protection. Discuss edge cases: user abandons MFA, redirect fails, or session expires, and how you handle them gracefully.

Key Points to Mention

  • OAuth 2.0 flow with authorization code and PKCE for security
  • Use of state parameter to prevent CSRF and maintain context
  • Backend-for-frontend pattern to keep sensitive tokens off the client
  • Short-lived, scoped tokens for the embedded widget to minimize risk
  • Handling of step-up authentication via redirects and session resumption
  • Error handling and fallback mechanisms for failed redirects or abandoned MFA

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

What security measures would you put in place around the iframe postMessage communication and how would you prevent a malicious host page from intercepting or spoofing messages?

System DesignTechnical Trade-offs
Author's notes

Answered this one pretty cleanly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the same-origin policy and how postMessage bypasses it, then outline a defense-in-depth strategy: strict origin validation, message schema validation, and secure channel establishment. Emphasize that you never trust the host page and always verify both sender and receiver identities.

Pro tip: Mention that you would use a unique, unpredictable channel name or token exchanged during initialization to prevent message spoofing, and that you would validate the event.origin against an allowlist rather than a single origin to support multiple environments.

1. Validate the sender's origin

Always check event.origin against a strict allowlist of trusted origins. Never use wildcard '*' in postMessage targetOrigin, and reject messages from unexpected origins.

2. Validate message structure and content

Define a strict message schema (e.g., using JSON schema or TypeScript types) and validate all incoming messages. Reject messages that don't conform or contain unexpected fields.

3. Establish a secure handshake

Use a unique, unpredictable token or nonce exchanged during initialization to authenticate the host and iframe. Include this token in every message and verify it.

4. Limit the attack surface

Restrict the iframe's permissions using the sandbox attribute, and avoid exposing sensitive APIs or data through postMessage. Use Content Security Policy (CSP) to control frame ancestors.

5. Monitor and log suspicious activity

Implement logging for rejected messages and rate limiting to detect and mitigate abuse. Consider using a dedicated library or framework for secure cross-origin communication.

Key Points to Mention

  • Same-origin policy and how postMessage bypasses it
  • Origin validation using event.origin and targetOrigin
  • Message schema validation and input sanitization
  • Secure handshake with nonce or token exchange
  • Sandbox attribute and CSP frame-ancestors directive
  • Avoiding wildcard '*' in postMessage and using allowlists

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you design the data model for users, linked accounts (items), institutions, and access tokens, and how do you isolate PII across partner tenants?

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

I went with a pretty normalized structure: institution table, user table scoped to Plaid's identity (not the partner's), item table linking a user to an institution with a status field, and access tokens stored encrypted with a per-tenant key.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and constraints, then outline a normalized data model with clear relationships and isolation boundaries. Emphasize how PII is segregated per tenant using encryption, access controls, and tokenization, and discuss trade-offs between normalization and performance.

Pro tip: Demonstrate awareness that as a frontend engineer, you care about how the API shapes data for the UI, and that you'd collaborate with backend teams to ensure the model supports efficient, secure data fetching without exposing PII.

1. Clarify Requirements and Constraints

Ask about scale, multi-tenancy requirements, compliance needs (e.g., GDPR, SOC2), and how PII is defined. This shows you don't jump to solutions without understanding the problem.

2. Design Core Entities and Relationships

Define users, items (linked accounts), institutions, and access tokens with their key attributes and relationships. For example, a user has many items, each item belongs to an institution and has an access token.

3. Isolate PII Across Tenants

Explain strategies like separate schemas/databases per tenant, encryption at rest with tenant-specific keys, and tokenization of PII. Mention that access tokens should be stored securely and never exposed to the frontend.

4. Address Trade-offs and Scalability

Discuss trade-offs between normalization and denormalization for performance, and how isolation impacts query complexity and cost. Consider how the model supports frontend needs like pagination and filtering.

5. Summarize and Connect to Frontend

Wrap up by explaining how this model enables secure, efficient frontend interactions, such as fetching linked accounts without exposing PII, and how you'd handle errors or token expiration in the UI.

Key Points to Mention

  • Normalized schema with foreign keys: users -> items -> institutions, and access tokens linked to items.
  • PII isolation via tenant-specific encryption keys and strict access controls (e.g., row-level security).
  • Tokenization or vaulting of sensitive data (e.g., access tokens) to minimize exposure.
  • API design that returns only necessary data to the frontend, avoiding PII leakage.
  • Trade-offs: separate databases per tenant for isolation vs. shared database with tenant ID for cost.
  • Compliance considerations: data residency, audit logs, and right to erasure.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.