Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/atproto-badges-initial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@fujocoded/atproto-badges": minor
---

Initial release of `@fujocoded/atproto-badges` — ATProto badge attestation utilities for creating, signing, and verifying badges per the badge.blue specification.

Also ships a `/react` subpath export with drop-in `<BadgeSection>`, `<BadgePill>`, `<BadgeClaim>`, and `<BadgeCertificate>` components, plus a `/styles.css` import. Components take async action handlers (`onClaim`/`onVerify`/`onUnclaim`) and theming props (`issuerName`, `getBadgeShortName`, `isRemoteBadge`, custom icon renderers), so consumers wire them to their own backend without forking. Requires Tailwind v4 in the consuming project.
6 changes: 6 additions & 0 deletions .changeset/authproto-callback-state-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fujocoded/authproto": patch
---

Fix custom-redirect / referer parsing in the OAuth callback so encoded
`redirect` and `referer` values are no longer silently dropped on login.
12 changes: 12 additions & 0 deletions .changeset/authproto-docs-and-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@fujocoded/authproto": patch
---

Fix custom-redirect / referer state parsing in the OAuth callback. The OAuth client wraps our state under an opaque key in the URL `state` param and returns the original value as `clientCallback.state`, so we now read from there instead of `requestUrl.searchParams.get("state")` — which was always the wrapped value and never parsed as JSON.

Also improve `astro-authproto` README and `02-read-bsky-profile` example:

- Document `session` driver setup and full integration config in install steps.
- Clarify `applicationDomain` should be the full URL with scheme (e.g. `https://example.com`, or `http://127.0.0.1:4321` locally).
- Add a "Shipping it" production section.
- Update the read-profile example to use `getBlueskyAgent` from `@fujocoded/authproto/helpers` instead of constructing `AtpBaseClient` directly, and fix the avatar `alt` to use a JSX expression.
8 changes: 8 additions & 0 deletions .changeset/authproto-dynamic-dev-port.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@fujocoded/authproto": patch
---

Use Astro's actual dev server port for the OAuth callback URL in development
instead of always assuming `4321`. If you run `astro dev --port 4322` (or set
`server.port` in your Astro config), Authproto now points OAuth at the right
local URL.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ import { defineAtProtoLiveCollection } from "@fujocoded/astro-atproto-loader";
// Set up validation for schemas via zod
const BlobRefSchema = z
.object({
ref: z.unknown(),
ref: z.union([z.string(), z.object({ $link: z.string() })]).nullish(),
mimeType: z.string(),
})
.transform((blob) => ({
cid: blob.ref == null ? undefined : String(blob.ref),
cid:
blob.ref == null
? undefined
: typeof blob.ref === "string"
? blob.ref
: blob.ref.$link,
mimeType: blob.mimeType,
}));

Expand Down
Loading