Skip to main content

Reflex custom component wrapping @clerk/clerk-react and integrating the clerk-backend-api

Project description

Test Status PyPi publish Status Demo Deploy Status

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 locally
  • task run-docs -- Run the docs locally
  • task test -- Run tests
  • task bump-patch/minor/major -- Bump the version (patch for a bug fix, minor for an added feature).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reflex_clerk_api-0.1.14.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reflex_clerk_api-0.1.14-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file reflex_clerk_api-0.1.14.tar.gz.

File metadata

  • Download URL: reflex_clerk_api-0.1.14.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for reflex_clerk_api-0.1.14.tar.gz
Algorithm Hash digest
SHA256 058093e839eccf682bae19108d1b67d32a5518f045383a097e39a276e3800ca7
MD5 71e328a176f6630e48901e2247f18bec
BLAKE2b-256 a1bf1601efa47a1adefd20559cd9393d19d8fd0be3a7fbaed33a584472d0ac01

See more details on using hashes here.

File details

Details for the file reflex_clerk_api-0.1.14-py3-none-any.whl.

File metadata

File hashes

Hashes for reflex_clerk_api-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 831da806c60fb228e6ebb7325390b89d8a082b78a0e5f7ba2d1fc0c2e1c159ec
MD5 3e3f5ff1e7def637a48648e5386db462
BLAKE2b-256 afea8ead7c2300ae7464e6a0689f0977c6f5415840535dd04e167c52b555cbc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page