Hi, I'm trying to use the usermetadata recipe on o...
# general
t
Hi, I'm trying to use the usermetadata recipe on our hosted instance (prod v3.10) I get the following error for an update or a getUserMetadata :
Copy code
'Error: SuperTokens core threw an error for a GET request to path: '/recipe/user/metadata' with status code: 404 and message: Not found\n\n    at Querier.<anonymous> (/workspaces/poppy/node_modules/.pnpm/supertokens-node@12.1.0/node_modules/supertokens-node/lib/build/querier.js:252:31)\n    at Generator.throw (<anonymous>)\n    at rejected (/workspaces/poppy/node_modules/.pnpm/supertokens-node@12.1.0/node_modules/supertokens-node/lib/build/querier.js:22:44)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)'
I can indeed see a 404 on
https://MY_DOMAIN:3567/recipe/user/metadata
Does my instance need to be updated?
r
hey @teebot yes it does. We can update it for you if you email us on team@supertokens.com specifying: - The backend SDK and it's version being used - If you want the core upgrade in dev env only or in prod and dev.
t
Hi @rp_st thx for the super quick reply 🙂 Currently reading the release notes to find any potential breaking changes
any gotcha to go from 3.8 to latest? we're using recipes passwordless and session
r
from the core's point of view, not many breaking changes. Any breaking changes there will be handled by us as we upgrade the core instance on our end. but from the backend SDK point of view, there could be code changes required on your side. Which version of the backend SDK are you using now?
t
I'm upgrading from supertokens-node 8.5 but currently testing latest and seems to be ok
r
hmm. Have you gone through the changelog here: https://github.com/supertokens/supertokens-node/blob/master/CHANGELOG.md -> from 8.5.0 and above?
t
I guess we need to update from Passwrdless to ThirdpartyPasswordless recipe and implement createAndSendCustomTextMessage. Currently we have overrides of apis for createCodePOST and consumeCodePOST and it seems to still work
r
if you don't want social login, you can continue to use passwordless recipe
t
not needed indeed
ok 👍
r
you can keep the overrides that you have. And just provide an empty function for
createAndSendCustomTextMessage
.
t
ok!
r
Do you have any users with email login or all just phone number?
t
only phone numbers
r
right. So should not require any change
you can email us and we can upgrade the core to the latest version that works with your backend SDK.
t
createAndSendCustomTextMessage is not empty at the moment
r
oh ok. So then you can keep that function as it is
t
ok
I'll send an email to upgrade
thx a lot rp!
r
thanks!
t
upgrade is done. thx supertokens team 😉
by the way I needed the usermetadata recipe to store the recent login history of our users. Some of our users are fraudulently sharing accounts so we want to challenge them with a face authentication when there are more than 3/4 logins in a week for example. I'm going to implement this but let me know if there's actually a builtin feature in the supertokens API to retrieve that history somehow
r
ah i see. There is no way to get the history of logins yet. Just the current active sessions per user.
t
that's what I presumed. I used metadata to implement it. I maintain a list of all logins of the last 7 days in that user metadata json object.
r
yea. Makes sense
t
it's very convenient that user metadata thing because it didn't really belong in our own database
r
yea! thanks!! 🙂
5 Views