Auth0 Home Blog Docs

How do I tell if someone signed up or logged in?

login
sign-up

#1

Is there any way I can tell if someone just signed up or is a returning user? I would like to direct a new user to a different route to the returning user. I can integrate my user database to find the answer but I’d prefer to not have to include this step if possible.


#2

I think best way to do this is add a flag on app_metada or user_metadata .

example, you can add a field like “on_boarded”.

So, if app_metadata.on_boarded = true (means existing users).
if app_metadata.on_boarded = false or doesn’t exist, means new user.

But if there is no security concerns regarding user able to set their own on_boarded status, then
you can also use user_metadata.


#3

Thanks for the suggestion. When I’m finished fighting with the current coding problem, I’ll give it a go.