bluesky-social / proposals

Bluesky proposal discussions
96 stars 10 forks source link

[Proposal 0004] Simple and working exaple with cURL #59

Open PIPOGit opened 2 months ago

PIPOGit commented 2 months ago

Hi all.

Can some put a valid and real example of how to work with OAuth authentication under Bluesky?

All steps, commented, to understand all things.

Thanks in advance.

bnewbold commented 1 month ago

It is pretty tricky to do all of this with curl. In particular, you need to have a client metadata document (JSON) hosted somewhere on the internet.

This python example goes through all the steps explicitly: https://github.com/bluesky-social/cookbook/tree/main/python-oauth-web-app

PIPOGit commented 1 month ago

Well... In fact, I'd like to check a couple of things: 1.- The "client metadata document" needs to be served under an "https" protocol; so it needs a VALID digital certificate. It means, I can not create and use a self-signed one, only valid certificates are allowed, restricting clients (not anyone has a "valid" https server). And 2.- The DPoP key, should use the same digital certificate than above or can be whatever certificate I want? Thanks!