ASP.NET Core Identity, cookies, JWT, OAuth 2.0, OpenID Connect, refresh tokens, claims and roles, API keys, MFA and passkeys, external login providers and Microsoft Entra ID.
-
A user changes their password or an admin disables their account. How do you make existing authentication cookies stop working straight away?
Junior
Theory
Authentication
-
How would you revoke a JWT access token before it expires, for example after an account is compromised?
Intermediate
Theory
Authentication
-
What is the JWT algorithm confusion attack, and how do ASP.NET Core and Microsoft.IdentityModel protect you against alg none and RS256/HS256 confusion?
Intermediate
Theory
Authentication
-
Why does PKCE matter even for a confidential web app that has a client secret?
Mid-Level
Theory
Authentication
-
Your Entra ID users belong to hundreds of groups and the groups claim disappears from their tokens. What is happening and how do you design around it?
Intermediate
Theory
Authentication
-
How would you design account recovery for users who lose the device holding their only passkey, without creating a phishing path around MFA?
Mid-Level
Theory
Authentication
-
What is the difference between authentication and authorisation? Explain how authentication works in ASP.NET Core: authentication schemes and handlers, ClaimsPrincipal and HttpContext.User, and why the order of UseAuthentication and UseAuthorization matters.
Authentication vs authorisation and the ASP.NET Core authentication model: schemes, handlers, ClaimsPrincipal, challenge vs forbid, and middleware order.
Beginner
Theory
Authentication
Β· π 3 follow-ups
-
How does cookie authentication work in ASP.NET Core? Explain what is inside the authentication cookie, the HttpOnly, Secure and SameSite flags, absolute vs sliding expiry, and the role Data Protection keys play.
Cookie authentication in ASP.NET Core: the encrypted ticket, cookie flags, expiry settings, server-side session stores and Data Protection keys.
Junior
Theory
Authentication
Β· π 2 follow-ups
-
What is a JWT? Explain its structure, how it is signed (RS256 vs HS256), which TokenValidationParameters actually matter when an ASP.NET Core API validates one, why you shouldn't put sensitive data in it, and why revoking a JWT is hard.
JSON Web Tokens: header, payload and signature, symmetric vs asymmetric signing, validation in ASP.NET Core JwtBearer, data exposure and the revocation problem.
Intermediate
Theory
Authentication
Β· π 2 follow-ups
-
What is the difference between OAuth 2.0 and OpenID Connect? Explain the roles, the authorisation code flow with PKCE, the client credentials flow, which flows are deprecated and why, and where OAuth 2.1 is heading.
OAuth 2.0 (delegated authorisation) vs OpenID Connect (authentication on top), the four roles, authorisation code + PKCE, client credentials, deprecated implicit and password flows, RFC 9700 and the OAuth 2.1 draft.
Mid-Level
Theory
Authentication
Β· π 2 follow-ups Β· π 1 real-world
-
How should refresh tokens work? Explain refresh token rotation and reuse detection, sensible lifetimes for access and refresh tokens, and where a single-page app should keep its tokens, including why the backend-for-frontend (BFF) pattern is now recommended.
Refresh tokens: purpose, rotation, reuse detection, lifetimes, sender-constraining, and token storage for SPAs with the BFF pattern in ASP.NET Core.
Mid-Level
Security
Authentication
Β· π 2 follow-ups Β· π 1 real-world
-
How do claims and roles work in ASP.NET Core? Explain what a claim is, how inbound claim mapping (MapInboundClaims) changes claim names, how IClaimsTransformation adds claims, and where an application's permissions should come from: the token, the database or both.
Claims and roles in ASP.NET Core: ClaimsPrincipal and ClaimsIdentity, NameClaimType and RoleClaimType, inbound claim mapping, IClaimsTransformation, and sourcing permissions from tokens vs the application.
Intermediate
Theory
Authentication
Β· π 2 follow-ups
-
What does ASP.NET Core Identity give you out of the box: password hashing, lockout, two-factor, MapIdentityApi and the rest? When would you build on Identity, and when would you use an external identity provider such as Microsoft Entra ID instead?
ASP.NET Core Identity's features (user store, PasswordHasher, lockout, 2FA, passkeys, MapIdentityApi) and the decision between Identity and an external identity provider.
Junior
Theory
Authentication
Β· π 2 follow-ups
-
When is an API key an appropriate way to authenticate callers? Explain how you would store, scope and rotate API keys safely, and write a custom API-key authentication handler for ASP.NET Core.
API keys: appropriate uses, key format, hashing stored keys, scoping and rotation, constant-time comparison, and an ASP.NET Core AuthenticationHandler implementation.
Mid-Level
Security
Authentication
Β· π 2 follow-ups Β· π 1 real-world
-
Compare the common MFA methods: SMS codes, TOTP authenticator apps, push notifications and FIDO2/WebAuthn passkeys. What makes a method phishing-resistant, how do passkeys work in ASP.NET Core Identity on .NET 10, and what do the Essential Eight require?
MFA methods and their weaknesses, why WebAuthn passkeys are phishing-resistant, passkey support in ASP.NET Core Identity (.NET 10), and the ACSC Essential Eight MFA requirements.
Mid-Level
Theory
Authentication
Β· π 2 follow-ups Β· π 1 real-world
-
Show how you would protect an ASP.NET Core API with Microsoft Entra ID. Cover the app registrations, Microsoft.Identity.Web, delegated scopes vs app roles, calling a downstream API on behalf of the user, and letting another Azure service call your API with a managed identity.
Securing an ASP.NET Core API with Microsoft Entra ID: app registrations, Microsoft.Identity.Web, scp vs roles, on-behalf-of with IDownstreamApi, token caches, and managed identity callers.
Mid-Level
Coding
Authentication
Β· π 3 follow-ups Β· π 1 real-world
-
After deploying your ASP.NET Core API behind a reverse proxy in a new environment, every request returns 401 even though clients send what look like valid tokens. How do you diagnose it, and what are the usual causes: issuer or audience mismatch, clock skew, signing-key rollover, the HTTPS scheme, or headers lost on the way?
Diagnosing JWT 401s after a deployment: WWW-Authenticate details, IDX error codes, issuer/audience/version mismatches, clock skew, JWKS reachability and key rollover, forwarded headers and stripped Authorization headers.
Senior
Debugging
Authentication
Β· π 2 follow-ups Β· π 1 real-world
-
Design authentication for a product with a React SPA, a public ASP.NET Core API and native mobile apps, where customers can also sign in with Google or Apple. Would you put tokens in the browser or use a backend-for-frontend, how do mobile apps sign in, and how does one API accept both cookie and JWT callers safely?
Authentication architecture for SPA, API and mobile clients: identity provider and external logins, BFF vs browser tokens, native app flows, and combining cookie and JWT schemes in ASP.NET Core with policy schemes.
Senior
Architecture
Authentication
Β· π 3 follow-ups Β· π 1 real-world