hi there, I have an issue with my tenant...not sur...
# support-questions-legacy
c
hi there, I have an issue with my tenant...not sure what might cause it: Error: SuperTokens core threw an error for a POST request to path: '/692da2df-dca9-48aa-8556-9be2a082fa7f/recipe/user/password/reset/token/consume' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: the error only happens when trying to reset a users password, all other auth functions seem to work
checking into the database (using the managed service), I can see that the app_id in the table tenants is "public" - is that correct?
looking further, I can see that the log shows a tenantId which is a uuid, not "public" - what probably causes the error...but where's the uuid coming from?
r
yea, the UUID is causing the error. It's coming cause the the during password reset link creation, you are somehow passing this UUID as the tenant ID to the backend
so you need to see how that could be happening from your frontend
are you using the multi tenancy recipe at all?
c
I'm not using multi tenancy. the payload to the backend endpoint auth//user/password/reset is also looking ok: {"formFields":[{"id":"password","value":"test12345"}],"token":"xxx","method":"token"}
frontend is using the function: import { submitNewPassword } from 'supertokens-web-js/recipe/thirdpartyemailpassword';
r
why do you have the UUID as part of the path?
thats causing this issue
c
hmm understandable, but that's the supertokens lib generating it, right?
I'll check later on what is happening there
r
no. We don't add a UUID, unless you return that value from the multiteneancy.init -> getTenantId function (from the frontend).
c
when I remove the uuid from the request I get the error: { "status": "RESET_PASSWORD_INVALID_TOKEN_ERROR" }
the init on the frontend is very minimalistic: SuperTokens.init({ appInfo: { appName: 'XXX', apiDomain: 'XXX', }, recipeList: [ThirdPartyEmailPassword.init(), Session.init({ tokenTransferMethod: 'header' })], });
r
Are you manually making the api call? Can I see how you are doing that?
c
the one without uid was done with postman yes
the only header I set was Rid with thirdpartyemailpassword
r
then you must be passing a bad value for the token. Also, the token is one time use
the image you sent doesn't load
c
I'll check again tmr.. I don't why the frontend is generating this kind of url in the first place though
r
yeaa.. very strange
c
I found the culprit: await ThirdPartyEmailPassword.sendResetPasswordEmail( 'public', user.id, email, );
the code should sent out invitation emails...but the user.id as 2nd param is wrong
r
It seems correct from the function signature in our SDK
Ahh. Its a bug in our backend SDK
We will release a fix today
c
ok great
r
hey @cruaier we have released the fix in our latest node SDK. Please try it out.
c
OK, will check it out and report
r
thanks
c
I can confirm, it works now correctly - thanks for the fix
r
thanks!
27 Views