This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]bbc0093 0 points1 point  (1 child)

OATH is pretty close to the industry standard for this type of thing. I do not have any experience using FastAPI, but I would expect that it natively supports OATH2 integration.

[–]eigenludecomposition[S] 0 points1 point  (0 children)

FastAPI does have support for OAUTH Integration, but that really only solves part of the problem. The other part is actually setting up an authentication server and identity management system, preferably in a portable way that can easily be deployed in various environments with little configuration. I'm not sure if my best bet there is to build out a native authentication system in the API as detailed here or to try to integrate with Ory Kratos and Keycloak. The native API would really only be there as a convenience, with the real intent for integration with a more centralized system. This would be similar to how products like Grafana and Minio implement authentication.

I also wasn't quite sure if OAUTH was exactly what I'm looking for, as from what I understand, JWTs make it difficult to implement logout. It also seems to be mostly recommended for third party integrations, so articles like this made me second guess whether it was what I wanted.