23 minutes ago · 17 min read3313 words · Tech · hide

Note: this is a proposal I've written for Tranquil PDS, you can also read it in the issue I posted on the repo here. I thought it was an interesting deep dive into code design, so I'm publishing it here too for a wider audience. tl;dr let's replace the scope parsing logic, which lives across several files and different paths, with a type Scope that by construction can only be valid Atproto OAuth comes with a specification for scopes, and strict rules on what is valid and not, documented here. Tranquil acts both as an OAuth client and as an authorization server. As an OAuth client Tranquil requests a set of scopes for the user's session when they log into the dashboard. As an authorization server, it validates the requested scopes and creates the OAuth session, handing over access token and refresh token. Tranquil has a full implementation of both of these roles, but each one sprawls over multiple files, and the logic for validating and granting a set of scopes to a session follows…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town