Skip to content

phishing resistant mfa #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

msaldivar
Copy link

@msaldivar msaldivar commented Apr 7, 2025

Related Issue

Link to the Github Issue created for this blog post

Link to Google Doc

https://docs.google.com/document/d/1bedpCOIgRmP8XySesQ2vr_5E1nMv2Bj88YONuurc79Y/edit?tab=t.0

Checklist

  • Has cover image been added
  • Have all content images been added. Do they render correctly? (aspect ratio etc)
  • The code inside code blocks gives no errors
  • Check for SEO keyword?
  • Added call to action to link to supertokens and to link to other blogs.
  • Add reference to how SuperTokens solves this blog's problem (if relevant).

Remaining TODOs

  • ...

Copy link

netlify bot commented Apr 7, 2025

Deploy Preview for gracious-clarke-e6b312 ready!

Name Link
🔨 Latest commit 4a81a87
🔍 Latest deploy log https://app.netlify.com/sites/gracious-clarke-e6b312/deploys/68099ead75c6370008682033
😎 Deploy Preview https://deploy-preview-401--gracious-clarke-e6b312.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@msaldivar msaldivar changed the title SuperTokens OAuth implementation(How SuperTokens builts its OAuth) phishing resistant mfa Apr 10, 2025
author: "Maurice Saldivar"
---

# Implementing Phishing-Resistant MFA: Hands-On Developer Guide
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this can be removed. Gatsby will automatically add a title tag


## Why Traditional MFA Fails

### SIM Swapping: When Your Phone Number Betrays You
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also have an internal link to our own sim swap blog https://supertokens.com/blog/sim-swapping

Comment on lines +62 to +72
### Why WebAuthn?

Phishing remains one of the most effective attack vectors against traditional authentication. WebAuthn counters this by binding authentication directly to the user's device through public-key cryptography. When users register with WebAuthn, their device generates a unique key pair for that service. The private key never leaves the device, while the public key is stored on the server. During authentication, the server sends a challenge only the correct private key can sign.

The critical phishing protection comes from origin binding \- the browser ensures authentication requests can only come from the exact domain that registered the credential. Even perfect site clones at different URLs will fail because the origins don't match. For developers, this means implementing authentication that protects users regardless of their susceptibility to phishing attempts.

### How WebAuthn works

WebAuthn creates a secure authentication framework built on asymmetric cryptography. Instead of storing shared secrets like passwords on servers, it employs public-private key pairs. When users register their device generates these unique keys - the private key remains secured on the device while the public key is stored on the server.The absence of passwords eliminates common vulnerabilities like credential stuffing, password spraying, and database breaches. There's simply no password to steal, reuse, or crack, removing entire categories of attacks from consideration.

User verification happens locally on the device through either biometrics (fingerprints, facial recognition) or hardware security keys. This verification proves the legitimate user is present without transmitting biometric data to the server. The local device handles all sensitive verification, then cryptographically signs the authentication challenge using the private key only after successful verification.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should be moved a little higher.

* Private keys never leave the user's device
* Biometric or physical presence verification ensures the legitimate user is present

In this guide, we'll implement a bulletproof phishing-resistant MFA system using SuperTokens, WebAuthn, and FIDO2 standards. This approach not only strengthens security but also improves user experience by reducing friction.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should breakdown what WebAuthn and FIDO is in the next section before we move onto implementation




<details><summary>Frontend config.tsx</summary>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldnt put these detail blocks, I think it will be easy for people to miss

@jscyo
Copy link
Collaborator

jscyo commented Apr 22, 2025

@msaldivar Please also add the metadata(it's mentioned in the contributing guide) and the cover image

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.

2 participants