Conversation
|
Dont worry about backwards compatibility, this is going to be a major version bump. |
… adapter Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
There was a problem hiding this comment.
We want to support all backends, we will need to adjust quite a bit of code for this.
There was a problem hiding this comment.
Implemented in af8eb75. I removed the Flask-only backend guard in ClerkAuth and switched Clerk runtime request handling to Dash backend request adapters (self._get_request()) across the auth flow, including redirect/auth checks and logout flow request usage.
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
This shouldnt be importing Flask, it should be relying on the backend from Dash to make_reponse, set headers, set cookies, etc. Is there a way that we can generate |
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Implemented in b3636b5. |
|
This needs to be done for all methods, auth, oidc, and Clerk. |
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Implemented in cd2d22f. I applied the backend-agnostic response/session pattern across |
|
There are dependencies on things like |
Co-authored-by: BSd3v <82055130+BSd3v@users.noreply.github.com>
Implemented in a7944ce. I removed remaining direct |
Dash v4.1 decouples from Flask and introduces a pluggable backend system (
app.backend) supporting Flask, FastAPI, and Quart. This library was hardwired to Flask via directflask.requestusage,@server.before_requestdecorator patterns, and Flask-specific config/session assumptions, breaking on the new backend abstraction.Changes
auth.py— Core backend abstraction + shared session/config primitives:_get_request()usesapp.backend.request_adapter().app.backend.before_request(...)._get_session,_save_session,_clear_session) and backend redirect helper (_redirect_response) for auth implementations._get_config_value,_set_config_value,_get_secret_key,_set_secret_key) with app-attached settings storage and server fallback.basic_auth.py— Backend-agnostic response/session/config handling:is_authorized()usesself._get_request()for headers.clerk_auth.py— Backend-agnostic Clerk runtime:app.backend.make_response,app.backend.jsonify).self._get_request()across redirect/auth/logout paths._get_safe_redirect_urlbackend-compatible by using request adapter URL parsing.app.server.config/app.server.secret_keydependencies with backend-agnostic config/secret helpers.oidc_auth.py— Backend-agnostic runtime response/session/config handling with Flask-backed OAuth client:authlib.integrations.flask_client.OAuth.public_routes.py— Removed Flask server-config storage assumptions:app.server.config, avoiding non-Flask config constraints.Tests
tests/test_clerk_auth.py— Safe-redirect coverage remains in place and validates request-handling behavior.tests/test_backend_config_access.py— Added targeted coverage for backend-agnostic config/secret helpers and public-route storage behavior.dev-requirements.txt— Updated todash[testing]>=4.1.0rc0.setup.py— Updated runtime requirement todash>=4.1.0rc0.This PR now targets a major-version behavior: pre-4.1 compatibility paths were removed and Dash 4.1+ is required.
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.