Auth0 Home Blog Docs

Temporary User



Hello all,

What is the suggested way to handle Temporary Users?

Our scenario is that we want to allow a user access for a given time (hours). Once this time has elapsed, they will be deleted.

Any suggestion?



My thought would be using the auth0 Management API:

[Link to management API][1]

You could have a script/function run that checks users date/time created which is a field you can get through the session/token information. From there you can just do a time check from your current time vs the time the user was created and if the difference is greater than your allotted time amount, run the api call to delete the user. You delete the user by using their id, so that is just something else you can pull from the session information.

I don’t know what language you are using with auth0 so sorry I could not give a more specific answer with code, but if you reply with the language you are using I might be able to help more.


Hi Nje,

I’m using C#

Ideally, I didn’t want to write another piece of code to do the scheduling but unless Auth0 offer something it may be my only option.