GithubHelp home page GithubHelp logo

zachgoll / auth0-react-mfa-refresh-bug-reproduction Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 146 KB

Reproduction of MFA error when using refresh tokens with SPA

JavaScript 41.22% TypeScript 58.78%

auth0-react-mfa-refresh-bug-reproduction's Introduction

This repo is a reproduction of the MFA + refresh tokens error for auth0-react library.

Reproduction steps

Create the tenant

With deploy client

  1. Create new tenant
  2. Create M2M application
  3. cp auth0/config.example.json auth0/config.json and add M2M app credentials to it
  4. Run yarn auth0:import to re-create tenant from this repo

Manual

  1. Create SPA app
  2. Enable OTP MFA in Security settings
  3. Create custom API, enable refresh tokens, set lifetime of token to short duration

Start apps

  1. yarn install
  2. yarn dev to start Next app
  3. yarn dev:server to start Express API

Trigger error

  1. Sign up to app and login
  2. With network tab open, click "Make API Call" button in app (this should work fine since MFA isn't enabled yet)
  3. Go to Auth0 dashboard and update the user's metadata to { "useMFA": true }
  4. Logout user, log back in, setup MFA
  5. Wait 10 seconds for token to expire (see tenant.yaml)
  6. Click "Make API Call" (this should throw a Error: MFA Required error)

auth0-react-mfa-refresh-bug-reproduction's People

Contributors

zachgoll avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.