-
-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Labels
priority-2-moderateShould be resolved on a reasonable timeline.Should be resolved on a reasonable timeline.
Description
Current Situation
It is currently fairly awkward to use ReactPy for authentication for some of our supported backends.
Reference
Proposed Actions
Have some sort of session integration to improve authentication usability within ReactPy.
We will need to decide how this API will look like after analyzing our backend's built-in authentication APIs. Not all backends contain authentication features though, so designing around this might get tricky.
It could possibly look like this:
from reactpy import component
from reactpy.backend.sanic import configure, create_session
use_session, session_store = create_session(
save=save_to_my_db,
load=load_from_my_db,
)
@component
def MyComponent():
session = use_session()
...
app = Sanic()
configure(app, MyComponent, Options(session_store=session_store)
app.run()Also, It might be reasonable for ReactPy to create it's own sqlite DB for things such as session keys on frameworks without native ORM capabilities.
Metadata
Metadata
Assignees
Labels
priority-2-moderateShould be resolved on a reasonable timeline.Should be resolved on a reasonable timeline.