Reflex custom component wrapping @clerk/clerk-react and integrating the clerk-backend-api
Project description
reflex-clerk-api
A Reflex custom component for integrating Clerk authentication into a Reflex application.
See a Demo.
See the Docs
Installation
Any of:
uv add reflex-clerk-api
pip install reflex-clerk-api
poetry add reflex-clerk-api
Usage
import reflex_clerk_api as clerk
def index() -> rx.Component:
return clerk.clerk_provider(
rx.container(
clerk.clerk_loaded(
clerk.signed_in(
clerk.sign_on(
rx.button("Sign out"),
),
),
clerk.signed_out(
rx.button("Sign in"),
),
),
),
publishable_key=os.environ["CLERK_PUBLISHABLE_KEY"],
secret_key=os.environ["CLERK_SECRET_KEY"],
register_user_state=True,
)
Contributing
Feel free to open issues or make PRs.
Usual process for contributing:
- Fork the repo
- Make changes on a feature branch
- Ideally, add tests for any changes (this will mean your changes don't get broken in the future too).
- Submit a PR
I use Taskfile (similar to makefile) to make common tasks easier. If you have that installed, you can run:
task install-- Install dev dependencies and pre-commit.task run-- Run the demo locallytask run-docs-- Run the docs locallytask test-- Run teststask bump-patch/minor/major-- Bump the version (patchfor a bug fix,minorfor an added feature).
TODO:
- How should the
conditionandfallbackprops be defined onProtect? They are supposed to beJavascriptandJSXrespectively, but are juststrfor now... IsJavascriptrx.Script? AndJSXrx.Component?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reflex_clerk_api-1.0.1.tar.gz.
File metadata
- Download URL: reflex_clerk_api-1.0.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c613063a0bf39370e1af463c2f88406e41ec09bd53bae9bb2a189b08c78ea20f
|
|
| MD5 |
f1e045ce59214925a25e74274e0800e7
|
|
| BLAKE2b-256 |
9e9b845107257bf1f855d6ff460a95ecd675c19e74dd211b4aaedf396a906d54
|
File details
Details for the file reflex_clerk_api-1.0.1-py3-none-any.whl.
File metadata
- Download URL: reflex_clerk_api-1.0.1-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
274c57b45367f45c4f51a20860874a4640bddbf6b60801cd9f4720ac3b3336fa
|
|
| MD5 |
b743205c7536adc85beeae2d3588025b
|
|
| BLAKE2b-256 |
4c20c834fe2f65605ca047fec585e9f5462da39e4a1339889206440700684d42
|