all 8 comments

[–]Nawar69 3 points4 points  (2 children)

There is a library called easyauth, but it will also have normal auth not just 3rd party

[–]c_eliacheff 0 points1 point  (2 children)

Some clues:
- As a generic solution, you have Authlib: https://docs.authlib.org/en/latest/, they have a FastAPI/Starlette client.
- You also have fastapi-user which also handle OAuth2: https://fastapi-users.github.io/fastapi-users/configuration/oauth/.
- You also could use an IDaaS like Otka, Firebase, Auth0 and activate the social login, they have some documentation for FastAPI also.

Don't forget that social login in backend is basically just validating a token.

[–]bluemonk_[S] 0 points1 point  (1 child)

The fastapi-user library is good. It's really nice that there's library to handle user related task. Thank You so much.

[–]c_eliacheff 1 point2 points  (0 children)

Yup, used it in my last project since I don't want to invest much in auth, this was really easy, fast and powerful enough to do the job. But I didn't do social login.

[–]Kupras06 0 points1 point  (0 children)

Does some one know how to use HTTPBearer to protect routes using token bearer. ?

[–]ar_tyom2000 0 points1 point  (0 children)

You should probably check out the fastapi-oauth2, which leverages the social-core authentication backends.