Hello, I (akshat-g-07 on github) have been wanting...
# contributing
p
Hello, I (akshat-g-07 on github) have been wanting to contribute to this community (supertokens-auth-react) and I was trying to setup the project in my local. I went through the steps mentioned in the Contributing.md. And I think something didn't go as expected that's why I am not able to setup. If someone can connect with me (so that I can share my screen) for few minutes to help me there, it would be really helpful. We can discuss it here as well if connecting is not convenient. Thanks in advance 🙂
n
Hi @protostaarranuj Can you explain what you tried and what issue are you facing?
p
Hello @nkshah2 Surely. 1.) I forked, then cloned both the repos (supertokens-auth-react and supertokens-root) in same parent directory (image attached) 2.) ran this command (npm run set-up-hooks) in supertokens-auth-react directory 3.) didn't modify anything yet (as i want to see something on browser before) 4.) ran this command (npm run build-pretty) in supertokens-auth-react directory 5.) ran this command (npm run lint) in supertokens-auth-react directory 6.) step 5 gave 129 warnings and 0 errors 7.) nothing started yet so tried npm start which gives me output : image attached.
n
Right so the auth react SDK cannot be "started" as such because its not a standalone website or anything like that
Once you have it cloned you can modify the code and run
npm run build-pretty
to build it
To test your changes locally you can use
npm link
(The npm docs explain how to use it) to use your local version of auth react with some react website project locally to see if your changes work
To run the tests you can follow the contributing guide for auth react which has links on how to setup supertokens-root and supertokens-core and actually be able to run the tests
p
so here in this section step 5 Set OAuth secrets it says : To get them, please contact the SuperTokens team. Can you please let me know about this part as well .
n
Right if you visit our docs about social login, in the quick setup -> backend section there is a step to initialise the social providers. Youll find the demo secrets there
You can use those
(The docs links could change overtime so they arent linked to directly in the CONTRIBUTING file)
p
umm can you please verify my understanding here: in docs you are talking about this path right: v2/session/quick-setup/backend.mdx
Also for this one, i ran (npm link) in supertokens-auth-react directory created a demo react app in that demo app ran (npm link supertokens-auth-react) and then npm start in that demo app. can you let me know if these are the right and enough steps or am i falling short somewhere? i kinda feel in a lil bit of dark and thanks for you time @nkshah2 to steer me to the bright side 🙂
n
Youll also need to run
npm link supertokens-auth-react
in the demo app so that it uses the local version
But yeah all in all it seems right
p
I ran that too npm link supertokens-auth-react in the demo app
n
Yep it should all be hooked up then
You can try by adding a simple log in the supertokens init function -> building by running build pretty -> re-running the demo app(not hot reload because node modules wont refresh, youll have to stop and start)
Verify your setup that way
p
Hey, if you dont mind can we have a short and quick connect pls I will share my screen and might get few things cleared.
n
We're all a little caught up at the moment, I can get on a quick call Wednesday if you like
Until then sadly itll have to be chat
p
ohkay np so you mentioned supertokens init function right I searched for the same and found it in examples\with-emailpassword-vercel\src\App.js so i logged like: (image attached) ran npm run build-pretty closed the prvs running demo app (ctrl+c) restarted it (npm start) but no luck 😦
i mean nothing came in my logs
n
The source code of the SDK is in src/ts
I would follow along from there
p
Am I doing something wrong here?
I dont see src folder
n
Ah right, lib/ts
p
gotcha
thanks for all the help 🙂
willl look into it now