https://supertokens.com/ logo
#general
Title
# general
a

anu

05/19/2022, 8:27 AM
Hi guys I'm trying to setup supertokens with hapi js. I followed the instructions for backend setup. But I'm getting this error "New route /auth/user/email/verify/token conflicts with existing /auth/user/email/verify/token" Any ideas what's going wrong? Thanks in advance
k

kakashi_44

05/19/2022, 8:34 AM
Hey @anu , what version of the sdk are you using? Also, can you share your setup code snippet for supertokens init
a

anu

05/19/2022, 8:40 AM
supertokens.init({ framework: 'hapi', supertokens: { // try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core. connectionURI: 'https://try.supertokens.com', // apiKey: "IF YOU HAVE AN API KEY FOR THE CORE, ADD IT HERE", }, appInfo: { // learn more about this on https://supertokens.com/docs/session/appinfo appName: 'app-name', apiDomain: 'http://localhost:3000', websiteDomain: 'http://localhost:4200', apiBasePath: '/authentication', websiteBasePath: '/auth', }, recipeList: [ ThirdPartyEmailPassword.init({ providers: [ // We have provided you with development keys which you can use for testsing. // IMPORTANT: Please replace them with your own OAuth keys for production use. Google({ clientId: '1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com', clientSecret: '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', }), Github({ clientId: '467101b197249757c71f', clientSecret: 'e97051221f4b6426e8fe8d51486396703012f5bd', }), Apple({ clientId: '4398792-io.supertokens.example.service', clientSecret: { keyId: '7M48Y4RYDL', privateKey: '-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgu8gXs+XYkqXD6Ala9Sf/iJXzhbwcoG5dMh1OonpdJUmgCgYIKoZIzj0DAQehRANCAASfrvlFbFCYqn3I2zeknYXLwtH30JuOKestDbSfZYxZNMqhF/OzdZFTV0zc5u5s3eN+oCWbnvl0hM+9IW0UlkdA\n-----END PRIVATE KEY-----', teamId: 'YWQCXGJRJL', }, }), // Facebook({ // clientSecret: "FACEBOOK_CLIENT_SECRET", // clientId: "FACEBOOK_CLIENT_ID" // }) ], }), Session.init(), // initializes session features ], });
just the boilerplate stuff
"supertokens-auth-react": "^0.21.3", "supertokens-node": "^9.2.0",
this is the specific error
I'm just doing the boilerplate code
k

kakashi_44

05/19/2022, 8:55 AM
Thank you, let me check
There is a bug in the supertokens hapi plugin. I'm currently working on the fix and will update you as soon as the it is fixed
a

anu

05/19/2022, 9:14 AM
Ok
Tysm
Hi @kakashi_44 I see the bug fixed in a recent commit
When will I be able to use the fixed version?
k

kakashi_44

05/19/2022, 10:07 AM
The fix will be merged today. I'll let you know once it is done and a new version of node sdk is released
Hey @anu , please try out node sdk version 9.2.1. Let me know if the issue is resolved
a

anu

05/19/2022, 11:53 AM
Sure
Let me check
9.2.1 is not available in npm yet
When will the release happen?
k

kakashi_44

05/19/2022, 12:01 PM
sorry, the release to npm is currently in pipeline. Meanwhile, you can test the change by doing
Copy code
bash
npm i -s github:supertokens/supertokens-node#9.2
a

anu

05/19/2022, 12:01 PM
For yarn?
k

kakashi_44

05/19/2022, 12:04 PM
Copy code
bash
yarn add https://github.com/supertokens/supertokens-node#9.2
a

anu

05/19/2022, 12:05 PM
Thank you
Seems like the issue no longer persists
Thank you @kakashi_44
There is a cors issue popping up now
Any extra things I have to do other than that mentioned in the docs?
k

kakashi_44

05/19/2022, 12:25 PM
can you share your cors setup
a

anu

05/19/2022, 12:26 PM
Sorry about that. Typo from my part fixed it
All ok
But signing up is not working
Something went wrong is showing up
Do we need to setup a core for testing the connection?
We can use the try url right?
k

kakashi_44

05/19/2022, 12:27 PM
Yes, you can use try url
can you share what error you are getting
a

anu

05/19/2022, 12:28 PM
Sure
k

kakashi_44

05/19/2022, 12:30 PM
what error is getting logged in the server side?
a

anu

05/19/2022, 12:30 PM
How to log it
currently nothing is being logged
k

kakashi_44

05/19/2022, 12:32 PM
on your browser, can you check which API is throwing the error?
a

anu

05/19/2022, 12:33 PM
No error showing in the console
k

kakashi_44

05/19/2022, 12:35 PM
can you share the response body
a

anu

05/19/2022, 12:36 PM
It has no body
Recipe error it is
Let me just check my backend recipies
k

kakashi_44

05/19/2022, 12:38 PM
Sure
a

anu

05/19/2022, 12:39 PM
Thank youu
You saved my day
It is working now
Thank you soo much for your quick response
k

kakashi_44

05/19/2022, 12:39 PM
Glad i could help
2 Views