Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8697cc5
Initial plan
Copilot Nov 26, 2025
60c56b3
Add missing Dash components for Clerk authentication
Copilot Nov 26, 2025
bb04d77
Fix clerk extras to include authlib dependency
Copilot Nov 26, 2025
76ef100
Skip Clerk test when credentials not available
Copilot Nov 26, 2025
12dce9a
Run npm format to apply Black formatting to component files
Copilot Nov 27, 2025
dfb90bf
Add npm build and format steps to build workflow
Copilot Nov 27, 2025
e39fc36
adding lint before build to make sure files match coding style before…
BSd3v Dec 1, 2025
1ee9bb8
Merge branch 'main' into copilot/create-dash-auth-plus-clerk
BSd3v Dec 1, 2025
334eb63
Delete dash_auth_plus/DashAuthComponents/_imports_.py
BSd3v Dec 1, 2025
3f30b4a
Delete dash_auth_plus/DashAuthComponents/ClerkProvider.py
BSd3v Dec 1, 2025
b1cc935
Delete dash_auth_plus/DashAuthComponents/UserProfile.py
BSd3v Dec 1, 2025
b0deafb
Delete dash_auth_plus/DashAuthComponents/UserProfilePage.py
BSd3v Dec 1, 2025
870f56d
Delete dash_auth_plus/DashAuthComponents/dash_auth_plus.js
BSd3v Dec 1, 2025
ed9362c
Delete dash_auth_plus/DashAuthComponents/dash_auth_plus.js.LICENSE.txt
BSd3v Dec 1, 2025
21edead
Delete dash_auth_plus/DashAuthComponents/dash_auth_plus.js.map
BSd3v Dec 1, 2025
349ddc4
Delete dash_auth_plus/DashAuthComponents/package-info.json
BSd3v Dec 1, 2025
464a413
Delete dash_auth_plus_components/ClerkProvider.py
BSd3v Dec 1, 2025
670ee9e
Delete dash_auth_plus_components/UserProfile.py
BSd3v Dec 1, 2025
7ea98b3
Delete dash_auth_plus_components/UserProfilePage.py
BSd3v Dec 1, 2025
b590330
Delete dash_auth_plus_components/_imports_.py
BSd3v Dec 1, 2025
1bbbb8f
Delete dash_auth_plus_components/dash_auth_plus.js
BSd3v Dec 1, 2025
b4086af
Delete dash_auth_plus_components/dash_auth_plus.js.LICENSE.txt
BSd3v Dec 1, 2025
13013e1
Delete dash_auth_plus_components/dash_auth_plus.js.map
BSd3v Dec 1, 2025
c2958a7
Delete dash_auth_plus_components/package-info.json
BSd3v Dec 1, 2025
056114a
reverting package adjustment
BSd3v Dec 1, 2025
85dfea5
fix missing if statement
BSd3v Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ jobs:
uv pip install -r dev-requirements.txt
npm i
shell: bash
- name: Lint code
run: |
source .venv/bin/activate
npm run lint
shell: bash
- name: Build components
run: |
npm run build
shell: bash
- name: Format code
run: |
source .venv/bin/activate
npm run format
Comment thread
BSd3v marked this conversation as resolved.
shell: bash
- name: Generate Python distribution
run: |
source .venv/bin/activate
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
uv pip install -r dev-requirements.txt

- name: Install dependencies from distribution
if: ${{ inputs.test-distribution }}
run: |
source .venv/bin/activate
WHL_FILE=$(find dist -name '*.whl' -type f | head -1)
Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include README.md
include dash_auth_plus/*
include dash_auth_plus/*
recursive-include dash_auth_plus/DashAuthComponents *.py *.js *.json *.txt *.map
recursive-include dash_auth_plus_components *.py *.js *.json *.txt *.map
29 changes: 16 additions & 13 deletions dash_auth_plus_components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,40 @@
from ._imports_ import * # noqa: F403,F401
from ._imports_ import __all__ # noqa: F401

if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'):
print('Dash was not successfully imported. '
'Make sure you don\'t have a file '
'named \n"dash.py" in your current directory.', file=_sys.stderr)
if not hasattr(_dash, "__plotly_dash") and not hasattr(_dash, "development"):
print(
"Dash was not successfully imported. "
"Make sure you don't have a file "
'named \n"dash.py" in your current directory.',
file=_sys.stderr,
)
_sys.exit(1)

Comment thread
BSd3v marked this conversation as resolved.
_basepath = _os.path.dirname(__file__)
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package-info.json'))
_filepath = _os.path.abspath(_os.path.join(_basepath, "package-info.json"))
with open(_filepath) as f:
package = json.load(f)

package_name = package['name'].replace(' ', '_').replace('-', '_')
__version__ = package['version']
package_name = package["name"].replace(" ", "_").replace("-", "_")
__version__ = package["version"]

_current_path = _os.path.dirname(_os.path.abspath(__file__))

_this_module = _sys.modules[__name__]

_unpkg = f'https://unpkg.com/dash-auth-plus@{__version__}/dash_auth_plus/'
_unpkg = f"https://unpkg.com/dash-auth-plus@{__version__}/dash_auth_plus/"

_js_dist = [
{
'relative_package_path': 'DashAuthComponents/dash_auth_plus.js',
'external_url': f'{_unpkg}dash_auth_plus.js',
'namespace': package_name
"relative_package_path": "DashAuthComponents/dash_auth_plus.js",
"external_url": f"{_unpkg}dash_auth_plus.js",
"namespace": package_name,
},
]

_css_dist = []


for _component in __all__:
setattr(locals()[_component], '_js_dist', _js_dist)
setattr(locals()[_component], '_css_dist', _css_dist)
setattr(locals()[_component], "_js_dist", _js_dist)
setattr(locals()[_component], "_css_dist", _css_dist)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
extras_require={
"oidc": ["authlib"],
"clerk": ["clerk-sdk", "clerk-backend-api==3.0.1"],
"clerk": ["authlib", "clerk-sdk", "clerk-backend-api==3.0.1"],
"all": ["authlib", "clerk-sdk", "clerk-backend-api==3.0.1"]
},
python_requires=">=3.8",
Expand Down
11 changes: 11 additions & 0 deletions tests/test_clerk_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from dash import Dash, html, dcc, page_container
from dash_auth_plus import ClerkAuth
import os
import pytest

def spinup_app():
from dash import Dash, html, dcc, page_container
Expand Down Expand Up @@ -69,6 +70,16 @@ def user_private(user_id: str, **kwargs):
register_page('private', path_template="/user/<user_id>/private", layout=user_private)
return app, auth

@pytest.mark.skipif(
not all([
os.getenv('CLERK_SECRET_KEY'),
os.getenv('CLERK_DOMAIN'),
os.getenv('CLERK_PUBLISHABLE_KEY'),
os.getenv('CLERK_TEST_USER'),
os.getenv('CLERK_TEST_PASSWORD')
]),
reason="Clerk credentials not available (requires CLERK_SECRET_KEY, CLERK_DOMAIN, CLERK_PUBLISHABLE_KEY, CLERK_TEST_USER, CLERK_TEST_PASSWORD)"
)
def test_clerk_auth_flow(dash_duo):
app, auth = spinup_app()

Expand Down