How to add an Auth0 rule to grant access based on user’s first login?

  auth0, authorization, javascript

I have a Shiny Application which has Auth0 authentication. I would like to add a custom JavaScript Rule on Auth0 to grant access for a week. I guess I should check the users first login date and grant access based on that, but I don’t know how to do it as I don’t know much JS.
Any help would be much appreciated.

Source: Ask Javascript Questions