Skip to content

Generic Framework Support? #201

@ccrvlh

Description

@ccrvlh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions