Getting started with FastAPI Web App

Hello, I’m new here and trying to get started with Auth0 for my python FastAPI web app. I found a great sample implementation that parallels what I want to do here:

except that it is for Flask. Is there a similar piece of sample code, but for FastAPI?

BTW, I did see this:

but it doesn’t appear to be parallel to the above Flask example; it’s much more complex and doesn’t contain /login and /logout routes, so I assume it is for a different type of application.

Thank you,
Rick

Hi @brandt.rick,

Welcome to the Auth0 Community!

It doesn’t look like we have a 1:1 example for FastAPI like the Flask example.

I think you should be able to implement it with authlib, similar to this example:

If you have any questions, let me know.

2 Likes

Thank you Dan, that looks like it will be helpful!

2 Likes

Happy to help! Let me know.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.