# Dietbox B2C — One identity backbone, two audiences, custom sign-in journeys.

> Custom Azure AD B2C policies for a product whose two audiences share nothing but an account: a practitioner subscribing, and a patient invited by the one treating them. Federated sign-in, silent migration off the legacy store, and revocation that actually signs a session out everywhere.

## Overview

One Azure AD B2C identity system carrying two audiences that share nothing but the account: a nutritionist subscribing and paying, and a patient arriving by invitation from the one treating them. Three years of custom sign-in journeys, federated providers, silent migration off the legacy store, and session revocation that reaches every open browser.

## Stack

- Azure AD B2C
- Identity Experience Framework
- XML
- OpenID Connect
- OAuth 2.0
- .NET 6
- HTML
- CSS
- Azure DevOps

## Highlights

- Federated sign-in with three providers, each exchanged into a common subject claim.
- Silent migration off the legacy store during the user’s own sign-in journey.
- Per-audience branded pages, one set for the practitioner and one for the patient.
- Entitlement gates for subscriber and academy journeys, enforced inside the sign-in flow rather than after it.

## Role

Senior Software Engineer, then Head of Technology · 2021–2024. Closed-source professional work — the write-up describes it without the source.

---

Source: https://felipealmeida.tech/projects/dietbox-b2c
