Hi there! We're changing the way we handle users metadata and we don't rely on supertokens anymore f...
f
Hi there! We're changing the way we handle users metadata and we don't rely on supertokens anymore for this (at least we don't store it in supertokens). Is there a way to clean all users metadata? (db, not sessions)
r
hey @florian_lefebvre you can loop through all users and call the updateMetadata function with each key set to
null
in the function arg. Or, you can just let it be in th db and ignore it. Whats the motivation for this change?
f
we already have the metadata in our main db, so I'm just cleaning things up
r
i see
f
what's the recipe to get all users? I'm a bit confused between them
r
are you using self hosted? If so, you can clear from that table directly
f
nope we're using the hosted cloud version iirc
awesome thank you 🙏 than I guess it's just a matter of
updateUserMetadata
for each
is there any rate limiting?
r
yea. If you get a 429 error, just wait for a few seconds and try again
f
gotcha thank you!
r
rate limit is between 50 and 100 rps for free users
f
I think I'll just put some delay by default between each request, doesn't need to be super fast
another question. when doing
supertokens.init
, do i need to provide the full config in this case or can it remain minimal? like just
framework
,
supertokens
,
appInfo
and
recipeList
with
UserMetadata.init()
?
just tried and yes that's enough
r
yup
2 Views