How to detect new user vs existing one

It’s a Create-react-app SPA. auth0-js is the only library I’m using at the moment for handling email/verification code. Once user enters the correct code I want to customize the UI depending on whether they’re new or not. It seems for that I need to set a metadata flag in my Auth0 rule?