https://github.com/supertokens/supertokens-plugin-captcha
https://github.com/supertokens/supertokens-plugin-captcha
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/supertokens/supertokens-plugin-captcha
- Owner: supertokens
- Created: 2025-02-02T22:24:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-06T14:12:11.000Z (21 days ago)
- Last Synced: 2025-06-06T15:25:11.204Z (21 days ago)
- Language: HTML
- Size: 908 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### FAQ
- Q: How do we make sure that a required recipe is installed (backend)?
- A: When overring a recipe, set the `recipeInitRequired` field to `true`- Q: How do i add authorization?
- A: You can use the `getAuthorisedUserId` or `isAUthroised` utility from `./utils`### Known Issues
- Throwing an error inside a handler will crash the server### To Do (besides known issues)
- [ ] Standardised error handling
- [ ] Path matching in handlers. This means would allow REST style paths
- [ ] Defined a better structure and better conventions for plugins.
- [ ] Enforce guidelines### General Guidelines
- Every plugin should have both/either folders: `backend`, `frontend`
- Backend plugins should have the mininum file strucutre:
- `backend/lib/tsconfig.json` - TypeScript config for building the backend plugin.
- `backend/lib/build` - will the built sources of the plugin.
- `backend/lib/ts` - plugin source files.
- `backend/lib/ts/config.ts` - contains various plugin configurations. At minimum it should contain and export `PLUGIN_ID` - unique identifier of the plugin.
- `backend/lib/ts/plugin.ts` - contains and exports the `init` plugin method - It initialises the plugin and returns a config object that implements `SuperTokensPlugin` from the `supertokens-node/types` package.
- `backedn/lib/ts/utils` - contains some commonly used methods for doing basic authorisation, loggin, etc.
- `backend/lib/ts/index.ts` - exports the `init` method and `PLUGIN_ID`.### Contributing
- As this will be a continuolsy evolvong repo, all changes to structure, best practices, conventions, etc SHOULD be documented
- Preferably, they should also be enforce through linters, build rules, commit hooks, etc