Skip to content
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

Generic Framework Support? #201

Open
ccrvlh opened this issue Oct 16, 2024 · 1 comment
Open

Generic Framework Support? #201

ccrvlh opened this issue Oct 16, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@ccrvlh
Copy link

ccrvlh commented Oct 16, 2024

Hey, thanks for sharing this!

Most of the code seems to be pretty generic when it comes to framework. I started converting it to Litestar here, however, the conversion seems to be so simple, that I was wondering if it would make sense to have a single SSO lib for the main frameworks (though of FastAPI, Litestar, Flask, Django).

For Litestar specifically, I just replaced Response, Redirect and the routers, had to add the location header manually, and all tests are passing. I'll be testing this in a "live" environment soon, to check if that was indeed enough.

I don't know Django much, but I guess having an interface for response, redirect, should be a big step forward, and then maybe just passing the driver (eg. framework) that is being used when instantiating the main SSO class. I guess dependency can get tricky (some litestar projects will use Msgspec instead of Pydantic for example), but should be doable.

Thoughts?

@tomasvotava
Copy link
Owner

Hey, that's a great idea, actually! I am still having a huge refactor for 1.0.0 release in mind, but there's no time yet to do it and it would be awesome to split the openid/sso part and the fascade for frameworks.

@tomasvotava tomasvotava added the enhancement New feature or request label Nov 3, 2024
@tomasvotava tomasvotava added this to the 1.0.0 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants