How to judge sign-up or login at Post-Login Action?

I’ve setup Stripe customer and Auth0 user connection according to following example:
https://developer.auth0.com/resources/labs/actions/sync-stripe-customers-and-auth0-users
And I’ve implemented our website with auth0-nextjs.

Firstly it looks good at both Google and database connection (username/password), but there is an issue with the one of the database connection user.
He continues failed to login because the logins_count is still 1 after signup and logout. I’ve expected the logins_count will increase to 2 at the second login attempt, but it remained to 1. Then the Post Login Action denied his login as he has been already registered at Stripe by existing customer ID at app_metadata.

I found Auth0 FAQ says that there is a case logins_count will not increment. When the above user attemped to login, the auth0 universal login page didn’t shown. So this could be the case.

I think we can safely return; without denying access at the check of data integrity described in the article: Auth0 Developer Resources

This will be a workaround for this case (maybe unsafe). But the root problem is that there is no actual way to judge sign-up or login at Login Action.
Is there a best practice for detecting sign-up or login at Post-Login custom Action?

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!