Skip to content

Authentication/Session Integration #769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Archmonger opened this issue Jun 22, 2022 · 1 comment
Closed

Authentication/Session Integration #769

Archmonger opened this issue Jun 22, 2022 · 1 comment
Labels
priority-2-moderate Should be resolved on a reasonable timeline.

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Jun 22, 2022

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.

@Archmonger Archmonger added this to the 2.0 milestone Jun 22, 2022
@Archmonger Archmonger added the priority-1-high Should be resolved ASAP. label Jan 27, 2023
@rmorshea rmorshea removed this from the Luxury milestone Feb 21, 2023
@Archmonger Archmonger added priority-2-moderate Should be resolved on a reasonable timeline. and removed priority-1-high Should be resolved ASAP. labels Jun 14, 2023
@Archmonger
Copy link
Contributor Author

Closing in favor of #828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-2-moderate Should be resolved on a reasonable timeline.
Projects
None yet
Development

No branches or pull requests

2 participants