How to Protect an API in FastAPI with Auth0 by Okta

  Рет қаралды 14,706

OktaDev

OktaDev

Күн бұрын

Note: This video was originally uploaded on October 8, 2021.
In this video you will learn how to leverage the FastAPI dependency injection system to integrate your API with Auth0 and protect your endpoints. You'll see how that affects your API documentation and how you can use code we provided to verify your Auth0 access token.
Chapters:
00:00 Intro
1:22 Running the Example Project
3:33 Dependency Injection System in FastAPI
5:09 Configuring an API in Auth0
7:10 Protecting the Endpoint
16:16 Making Protected Requests
24:54 Outro
Links:
- Code sample: github.com/jtemporal/fastapi-...
- Securing a FastAPI server with Auth0 by Mark Halpin: auth0.com/blog/build-and-secur...
- A very complete blog post on "How to Handle JWTs in Python": auth0.com/blog/how-to-handle-...
- Auth0's page on JWTs: auth0.com/learn/json-web-tokens/
- Auth0's free ebook on JWTs: auth0.com/resources/ebooks/jw...
- Documentation on Python virtual environments: docs.python.org/3/library/ven...
___________________________________________
Learn with Auth0 by Okta
Try for free - a0.to/auth0
The Auth0 by Okta blog - a0.to/blog
Ask questions on the Community Forum - a0.to/community ___________________________________________
Follow Us on Social
Twitter - / oktadev
LinkedIn - / oktadev

Пікірлер: 17
@rochelouis2494
@rochelouis2494 8 ай бұрын
Great explanation, really awesome. Thanks Jess for this topics, keep uploading videos of this type
@shanmugamkatna9534
@shanmugamkatna9534 5 ай бұрын
Simple and easy for any one to understand.
@kalebujordan1417
@kalebujordan1417 Жыл бұрын
Awesome, You just saved my day
@OktaDev
@OktaDev Жыл бұрын
Glad to hear it!
@youczire
@youczire 6 ай бұрын
Great content. Please do a social login video too. With the rise of fastapi, lot of people will be looking for fastapi+auth0+social login combo. Thanks
@MarcosViana
@MarcosViana 3 ай бұрын
Adorei, assisti sua live com o Dunossauro. Obrigado por campartilhar seu conhecimento.
@danielarledge7017
@danielarledge7017 6 ай бұрын
Hey Jess, great video. I do have an additional request. I would like to see a auth flow where you can use client credentials to generate an authorization code which could then be used to get access token. Ideally I want to pass in a scope along with the authorization code to Auth0 authorization server API in order to populate claims in my JWT and then use those claims to discern access to certain endpoints within my API.
@user-xf7hj7ll6r
@user-xf7hj7ll6r 10 ай бұрын
Hello, @OktaDev ! Could you provide the same example but with Okta dashboard?
@Sky25way
@Sky25way Жыл бұрын
Thanks for the demo! I am receiving the following error: urllib.error.URLError: I set the .config file with the correct values from Auth0 account (as instructed in the video). Any thoughts on how to fix?
@saisurya53
@saisurya53 6 ай бұрын
Hey! i was also experiencing the same error. Did you fixed it?
@ashpakshaikh07
@ashpakshaikh07 11 ай бұрын
Hi Jess, Thank you for making this video. I am trying to send token from frontend and validate it in fastapi, but getting an error "{'status': 'error', 'msg': "Invalid payload string: 'utf-8' codec can't decode byte 0xbf in position 0: invalid start byte"}". Not sure what's going wrong. I also tried splitting it with space as I am sending "Bearer {toekn}" from frontend. Appreciate if someone could help. Thanks.
@daguich
@daguich 11 ай бұрын
don't know if typo in the comment or in your code... but "Bearer {token}"?
@ashpakshaikh07
@ashpakshaikh07 11 ай бұрын
@@daguich Yes, it is typo. I used token. :)
@serguei5000
@serguei5000 10 ай бұрын
source code is not reflecting material presented on the screen was waste of time
@TheBuddilla
@TheBuddilla 2 ай бұрын
One day people will learn they should host their own auth instead of using external third party auth providers. Sadly they will learn when the third party service goes down.
@JustWorkandThatsit.
@JustWorkandThatsit. Жыл бұрын
Please consider reducing the length of your video by speaking concisely and avoiding unnecessary jargon.
@Unknown-ee7db
@Unknown-ee7db Жыл бұрын
Perfect tnx
Migrating Auth0 Rules to Auth0 Actions
25:37
OktaDev
Рет қаралды 2,7 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 150 М.
UFC Vegas 93 : Алмабаев VS Джонсон
02:01
Setanta Sports UFC
Рет қаралды 226 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 18 МЛН
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 26 МЛН
Secure Your Nest js API Endpoints with Auth0 in ~10 Minutes
14:22
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,7 МЛН
4 Tips for Building a Production-Ready FastAPI Backend
27:02
ArjanCodes
Рет қаралды 51 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 49 М.
How To Create a Python API With FastAPI - Full Tutorial
25:39
Tech With Tim
Рет қаралды 30 М.
Auth0 - High Level Overview for Your Project Architecture
14:58
Dedicated Managers
Рет қаралды 21 М.
FastAPI Authentication with  JWT (JSON Web Tokens)
56:18
Bek Brace
Рет қаралды 94 М.
An Illustrated Guide to OAuth and OpenID Connect
16:36
OktaDev
Рет қаралды 559 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,1 МЛН
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 825 М.
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 4,1 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН