Тёмный

Implementing OAuth 2.0 from SCRATCH 

Carberra
Подписаться 21 тыс.
Просмотров 3,1 тыс.
50% 1

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@TheDiamondRoblox
@TheDiamondRoblox 5 месяцев назад
Thank you! It’s something new I learned tbh ❤
@zulucharlie5244
@zulucharlie5244 17 дней назад
Thank you! If you were going to do OAuth2.0 using a library, what would you recommend? Thank you!
@Carberra
@Carberra 17 дней назад
Honestly, I don't know! I only use OAuth 2 for one project, and that used to use the google-api-python-client, which especially at the time was a dependency jumbo pack. I've used custom code ever since, so have never really used a library for it! Been tempted to create one though, just a simple lightweight thing, though many others probably exist.
@zulucharlie5244
@zulucharlie5244 17 дней назад
@@Carberra Thank you. I'm in the middle of my first PKCE implementation, and I'm also going the write-your-own route. I'm interfacing with AWS Cognito, and I've been surprised at the lack of tutorial videos on the subject. Thanks again, your content helped me!
@KossackFrank
@KossackFrank 5 месяцев назад
Thanks, this will be very helpful, refactoring my oauth … sadly not all provided libraries are easy to use
@birdie123
@birdie123 5 месяцев назад
The json module has a "load" method to read a json file directly. There is no need to use either OS or Pathlib to load the json file. 😜 # Typical usage: with ("secrets.json", "r") as file: secrets = json.load(file)
@Carberra
@Carberra 5 месяцев назад
Can't one-line it though! (Well, unless you don't close it.)
@birdie123
@birdie123 5 месяцев назад
​@@Carberra Oops mistake... it should have been with open("secrets.json", "r") as file: secrets = json.load(file)
@yibowei9636
@yibowei9636 5 месяцев назад
I prefer Pathlib for all file-system operations because it's a lot easier to handle exceptions, relative/absolute conversions, and most importantly one-line code for read/write operations.
@birdie123
@birdie123 5 месяцев назад
@@yibowei9636 I might argue that using the "with" keyword (context manager) is more "Pythonic". 🐍🐍🐍 If handling exception/s is required, I tend to use the following: try: with open(file, "r") as file: # do something json.load(file) except IOError as ioe: print(ioe) except Exception as e: print(e)
@ronalddebruijn613
@ronalddebruijn613 4 месяца назад
Great explanation. It will improve my access/refresh handling! I wrote an ugly selenium script to automate the authorize part. For my application the access/refresh tokens are very shortlived. Have you (or anybody) thought about automating the authorization part?
@Carberra
@Carberra 4 месяца назад
Thanks! As far as I know the authorisation part is designed specifically so it can't be automated. I don't know if anyone's managed it, but I tried once and couldn't manage it. I didn't try anything with Selenium though.
@ronalddebruijn613
@ronalddebruijn613 4 месяца назад
I think Selenium is kind of last resort to hack the unhackable. I don't think it will be resistant to changes on the website. But for now it avoids many clicks...There might me more maintable options than Selenium. But my knowledge here is limited...
@davidmurphy563
@davidmurphy563 5 месяцев назад
Dunno... It's good to learn about these things but I don't think I'd ever be comfortable writing security critical things like this myself. There's a long, careful academic / peer / deployment process the libraries go through that I just couldn't duplicate on my own. Nah, I'd never get above 99.9% confident there wasn't a hidden exploit and that's just not good enough... On this sort of thing I'm going to be risk adverse and use a library all day long.
Далее
Python has BIOMETRIC support?!
11:43
Просмотров 2,4 тыс.
Generics are VITAL in typed Python
16:54
Просмотров 10 тыс.
Как не носить с собой вещи
00:31
Просмотров 876 тыс.
Немного заблудился 😂
00:16
Просмотров 251 тыс.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OAuth 2.0 - a dead simple explanation
9:16
Просмотров 22 тыс.
Python 3.13's new REPL is AMAZING
10:21
Просмотров 60 тыс.
An Illustrated Guide to OAuth and OpenID Connect
16:36
Просмотров 601 тыс.
OAuth From Scratch (golang)
2:38:03
Просмотров 1,5 тыс.
Are metaclasses the HARDEST thing in Python?
20:41
Просмотров 4,3 тыс.
Oauth 2.0 tutorial Explain Like I’m 5
15:47
Просмотров 61 тыс.