How to implement manual authentication without TTL entry

In MongoDB land, one way to create a user is creating a userToken when they sign up that automatically gets deleted by the database in expiresAt seconds if they don't confirm their account via email. What is the conventional way to accomplish this if there is no TTL functionality as it seems like Prisma doesn't support an expiresAt feature. I want to avoid a ton of userTokens accumulating in my DB if someone maliciously keeps signing up new accounts - besides rate limiting them and banning their ip etc. Just interested in db level cleaning solutions.. or alternatives to creating this userToken
1 Reply
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server