Hi guys I'm trying to setup supertokens with hapi ...
# general
a
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
Hey @anu05891 , what version of the sdk are you using? Also, can you share your setup code snippet for supertokens init
a
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
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
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
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 @anu05891 , please try out node sdk version 9.2.1. Let me know if the issue is resolved
a
Sure
Let me check
9.2.1 is not available in npm yet
When will the release happen?
k
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
For yarn?
k
Copy code
bash
yarn add https://github.com/supertokens/supertokens-node#9.2
a
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
can you share your cors setup
a
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
Yes, you can use try url
can you share what error you are getting
a
Sure
k
what error is getting logged in the server side?
a
How to log it
currently nothing is being logged
k
on your browser, can you check which API is throwing the error?
a
No error showing in the console
k
can you share the response body
a
It has no body
Recipe error it is
Let me just check my backend recipies
k
Sure
a
Thank youu
You saved my day
It is working now
Thank you soo much for your quick response
k
Glad i could help
3 Views