Skip to content

Instantly share code, notes, and snippets.

@dimutch833
Created June 16, 2023 17:15
Show Gist options
  • Save dimutch833/3d911745d5f331c91dda9917095f1a8c to your computer and use it in GitHub Desktop.
Save dimutch833/3d911745d5f331c91dda9917095f1a8c to your computer and use it in GitHub Desktop.

Bluesky Login Flow

To login you need to make POST request to https://bsky.social/xrpc/com.atproto.server.createSession with JSON in body

{
 "identifier" : "alice.host.com",
 "password" : "PASSWORD"
}

then you get like this

{
  "did" : "did:plc:121344",
  "handle" : "alice.host.com",
  "email" : "email@mail.com",
  "accessJwt" : "accessJWT",
  "refreshJwt" : "refreshJWT"
 }

Then you can use this JWT Token as Bearer authentification when you are making requests that needs auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment