Progressive profiling in Gatsby

Hi there. I’m looking for some advice on how to setup progressive profiling in a Gatsby-driven web app, which uses the auth0-js SDK. Once a user signs up (either with email/password or Google auth), we want to capture a few required fields (age verification etc) on a separate onboarding page, preferably before the user registration process completes.

I’ve followed advice on how to setup the redirect rules here so that part is more or less working: https://github.com/auth0/rules/tree/master/redirect-rules/progressive-profiling

Also, I’ve referred to Ashish’s Express JS profile app example here for clues on how to setup the onboarding page in our Gatsby site: https://github.com/ashishdasnurkar/update-profile-website
This is the part I’m mostly having trouble with as we’d like to keep all the front end code within our Gatsby codebase. I’m not sure what auth0-js client methods I need to use here to extract the data returned from the redirect rule. Also wondering:

  • can this indeed be achieved using Gatsby/React instead of having to create a separate standalone Express JS app just for the onboarding page?
  • is it really necessary to use a JWT token for our use case?

Any advice including a code example would be greatly appreciated.