We're so excited you're interested in helping with SuperTokens! We are happy to help you get started, even if you don't have any previous open-source experience 😊
- Take a look at How to Contribute to an Open Source Project on GitHub
- Go through the SuperTokens Code of Conduct
- Check our Github Issues to see if someone has already answered your question.
- Join our community on Discord and feel free to ask us your questions
- OS: Linux or macOS
- Nodejs & npm
- IDE: VSCode(recommended) or equivalent IDE
- Please setup
supertokens-core
by following this guide. If you are not contributing tosupertokens-core
, please skip steps 1 & 4 under "Project Setup" section. git clone https://github.com/supertokens/supertokens-auth-react.git
,supertokens-auth-react
andsupertokens-root
should exist side by side within the same parent directory.cd supertokens-auth-react
- Install the project dependencies
npm run init
- Add git pre-commit hooks
npm run set-up-hooks
- Open the
supertokens-auth-react
project in your IDE. - You can start modifying the code.
- After modification, you need to build the project:
npm run build-pretty
- Make sure the linter passes:
npm run lint
-
Navigate to the supertokens-root repository
-
Start the testing environment
./startTestEnv --wait
-
In a new terminal, navigate to the
supertokens-auth-react
repository. -
Setup node server for testing.
cd ./test/server/ npm i -d npm i git+https://github.com:supertokens/supertokens-node.git
-
Set OAuth secrets
- Make sure you copy
test/.env.example.js
totest/.env.js
and add correct values. - Make sure you copy
test/server/.env.example
totest/server/.env
and add correct values. - To get them, please contact the SuperTokens team.
- Make sure you copy
-
Open a new terminal in
supertokens-auth-react
and run all testsnpm run test
You can set the SCREENSHOT_ROOT
env var to a path to automatically save screenshots of failing e2e tests. This will save screenshots of failing test into subdirectories of SCREENSHOT_ROOT
where the subdirectory identifies the test file and the file names of the screenshots identifying the test title and the
SCREENSHOT_ROOT=test_report npm run test
npm run start
Note: To test different recipes you need to update the value of authRecipe
in local storage. For example thirdpartyemailpassword
would result in that recipe being used. If there is no value for authRecipe
set, the Email Password recipe is used by default
Note: You need to restart the test app after code changes in the library to see their effects.
- Before submitting a pull request make sure all tests have passed
- Reference the relevant issue or pull request and give a clear description of changes/features added when submitting a pull request
- Make sure the PR title follows conventional commits specification
SuperTokens is made possible by a passionate team and a strong community of developers. If you have any questions or would like to get more involved in the SuperTokens community you can check out:
Additional resources you might find useful: