2489 Commits

Author SHA1 Message Date
Foysal Ahamed
02c358d0ca
Adds safelink module (#3945)
*  Adds safelink module

*  Remove createdAt timestamp bloat

* :rotating_lights: Fix lint issue

* 🐛 Fix pagination

* 🔨 Refactor safelink rule table

* 🧹 Add better default

*  Better search params

*  Remove mod requirement for query rules and events

*  Cleanup search for queryEvents

* 📝 Add changeset

* :rotating_lights: Fix lint issue

* 🧹 Adjust as per review feedback

*  Add support for sort direction in safelink rules

* :rotating_lights: Fix lint issue

*  Split input and response object shape

* :rotating_lights: Fix lint issue
2025-07-02 21:17:38 +02:00
github-actions[bot]
cf3af4660d
Version packages (#4012)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-01 06:59:28 -07:00
Samuel Newman
d344723a10
Loosen unspecced constraint on saved feed IDs (#4010)
* only specify ID must be present

* update validateSavedFeed test

* changeset

* fix unused import

* fix typo in changeset
2025-07-01 06:48:09 -07:00
Samuel Newman
8a0f190399
Subscribe to activity implementation (#3908)
Co-authored-by: rafael <rafael@blueskyweb.xyz>
2025-06-30 18:43:27 -03:00
github-actions[bot]
a2705e5a5d
Version packages (#4006)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-30 08:14:33 -07:00
Samuel Newman
bb65f7a6e2
Add subscribed-post notification reason (#4005)
* add new notification reason

* changeset
2025-06-30 07:53:56 -07:00
github-actions[bot]
76367f8a94
Version packages (#4001)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-27 04:52:57 -07:00
Samuel Newman
376778a92f
Add missing put method to record (#3997)
add missing put record
2025-06-27 04:11:10 -07:00
rafael
3499642ed1
Improve stash types for namespaces (#4000) 2025-06-26 16:45:18 -03:00
github-actions[bot]
ad81144cac
Version packages (#3996)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-25 23:33:53 -07:00
Samuel Newman
e3e31b2b9b
Add put method to record utility classes (#3995) 2025-06-25 23:06:22 +03:00
github-actions[bot]
b70f62c6b9
Version packages (#3988)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-24 06:17:02 -07:00
rafael
6cd1202065
Subscribe to activity lexicons (#3990)
* Activity subscription lexicons

* Update lexicons/app/bsky/notification/declaration.json

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>

* update codegen

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
2025-06-24 03:43:53 -07:00
Matthieu Sieben
f792b91938
Improve error reporting and logging (#3953)
* Improve error reporting and logging

* tidy

* tidy

* Improve zod error message extraction

* Properly serialize request in oauth logger

* Improve formatting of Zod errors

* Restore logging of refresh errors

* tidy

* Avoid double logging of errors

* tidy

* tidy

* revert merge changes

* tidy

* tidy

* more tidy
2025-06-23 19:49:10 +02:00
Matthieu Sieben
3a1e010e14
OAuth: Improve error reporting (#3973)
* Fix authorization error type name

* Refactor authorization error handling: replace AccessDeniedError with AuthorizationError and improve error reporting
2025-06-23 18:30:33 +02:00
Matthieu Sieben
09d90ae486
Improve OAuth Example app (#3952)
* Improve OAuth Example app

* Improve style

* bsync: Accept NSID with fragment in operation ns (#3954)

* Add `match: MuteWordMatch` to `muted-word` mod decision `cause` (#2934)

* Return MuteWordMatch instead of simple boolean

* Return full mute word with match

* Add MuteWordMatch to decision cause, update a few tests

* Backwards compat

* Tighter types

* Return all mute word matches

* Clean up types

* Rename

* More cleanup of naming

* Remove unneeded changes

* Format

* Add predicate value to matches

* Better migration path

* Changeset

* Import sort

* Tighten up addMuteWord API

Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com>

* Mute words: handle `Andor` and `and/or` case (#3948)

* Handle Andor case

* Remove useless escape

* Changeset

---------

Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com>

* Version packages (#3947)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update README.md to add some missing details in examples (#3254)

Update README.md

Improve code examples (some OAuth implementation details are missing in these examples)

* Increase oauth session & refresh token lifetimes (#3883)

* Allow HTTPS `redirect_uris` from any origin (#3811)

* bump MST key length from 256 to 1024 chars (#3956)

* bump MST key length from 256 to 1024 chars

* update MST key test

* add a changeset

* Version packages (#3959)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Rename `filter` -> `include` (#3966)

* rename filter -> include

* changeset

* fix tests

* Minor Fixes: Typo Correction and Comment Update (#3961)

* Update blob-resolver.ts

* Update index.ts

* Appview: sync up protos for notification prefs (#3970)

appview: sync up protos for notification prefs

* Version packages (#3969)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix invalid use of `invalid_client` (#3967)

* Replace slice() with subarray() in car file parsing (#3971)

* Replace slice() with subarray() in car file parsing

* changeset

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>

* Re-export all types & utilities needed to instantiate an OAuth client (#3976)

* Re-export all types & utilities needed to instantiate an OAuth client

* Add `jwkPrivateSchema` to ensure a key is private

* Return object instead of array as result of `findPrivateKey`

* Allow override of default `handleResolver` and `runtimeImplementation` options for NodeOAuthClient

* changeset

* Allow `OAuthClient` to be instantiated with custom `didResolver` instance

* Version packages (#3975)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Perform a bi-directional check when resolving identity from did (#3977)

* Perform a bi-directional check when resolving identity from did

* tidy

* Reject did documents containing invalid `alsoKnownAs` ATProto handles

* Use error classes

* tidy

* Improve identity resolution

* tidy

* Allow non-normalized handles in did document

* pnpm-lock

* Version packages (#3979)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* repo: MST should allow tilde in keys (#3981)

* repo: MST should allow tilde in keys

* add changeset

* fic ci

* tidy

* tidy

---------

Co-authored-by: rafael <rafael@blueskyweb.xyz>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: James Futhey <kidGodzilla@users.noreply.github.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: leopardracer <136604165+leopardracer@users.noreply.github.com>
Co-authored-by: devin ivy <devinivy@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2025-06-23 17:31:02 +02:00
Matthieu Sieben
4c2d499178
Identity resolver's resolve() method returns valud consistent with resolveIdentity (#3982)
* Identity resolver's `resolve()` method returns valud consistent with `com.atproto.identity.resolveIdentity`

* Refactor IdentityResolver into interface

* Update .changeset/few-rivers-chew.md

Co-authored-by: devin ivy <devinivy@gmail.com>

* tidy

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2025-06-23 16:27:25 +02:00
bnewbold
a8dee6af33
repo: MST should allow tilde in keys (#3981)
* repo: MST should allow tilde in keys

* add changeset
2025-06-22 17:43:06 -07:00
github-actions[bot]
bc2c578203
Version packages (#3979)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-20 10:54:34 +02:00
Matthieu Sieben
9dac8b0c60
Perform a bi-directional check when resolving identity from did (#3977)
* Perform a bi-directional check when resolving identity from did

* tidy

* Reject did documents containing invalid `alsoKnownAs` ATProto handles

* Use error classes

* tidy

* Improve identity resolution

* tidy

* Allow non-normalized handles in did document

* pnpm-lock
2025-06-20 10:34:53 +02:00
github-actions[bot]
9f9a08648b
Version packages (#3975)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-19 20:43:13 +02:00
Matthieu Sieben
90b4775fc9
Re-export all types & utilities needed to instantiate an OAuth client (#3976)
* Re-export all types & utilities needed to instantiate an OAuth client

* Add `jwkPrivateSchema` to ensure a key is private

* Return object instead of array as result of `findPrivateKey`

* Allow override of default `handleResolver` and `runtimeImplementation` options for NodeOAuthClient

* changeset

* Allow `OAuthClient` to be instantiated with custom `didResolver` instance
2025-06-19 19:27:38 +02:00
Paul Frazee
5fccbd2a14
Replace slice() with subarray() in car file parsing (#3971)
* Replace slice() with subarray() in car file parsing

* changeset

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2025-06-18 20:39:05 -07:00
Matthieu Sieben
68c43a94bd
Fix invalid use of invalid_client (#3967) 2025-06-18 15:46:32 +02:00
github-actions[bot]
727d9330a1
Version packages (#3969)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-18 02:12:45 -07:00
devin ivy
9f7be0b9eb
Appview: sync up protos for notification prefs (#3970)
appview: sync up protos for notification prefs
2025-06-17 22:34:52 -04:00
leopardracer
96c08da3ab
Minor Fixes: Typo Correction and Comment Update (#3961)
* Update blob-resolver.ts

* Update index.ts
2025-06-17 11:40:02 -07:00
Samuel Newman
97ef116571
Rename filter -> include (#3966)
* rename filter -> include

* changeset

* fix tests
2025-06-17 13:45:49 -04:00
github-actions[bot]
b4cb1ebac9
Version packages (#3959)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-17 15:50:58 +02:00
bnewbold
8bd45e2f89
bump MST key length from 256 to 1024 chars (#3956)
* bump MST key length from 256 to 1024 chars

* update MST key test

* add a changeset
2025-06-14 11:39:56 -07:00
Matthieu Sieben
7d9808ca81
Allow HTTPS redirect_uris from any origin (#3811) 2025-06-14 14:30:24 +02:00
Matthieu Sieben
e27d908454
Increase oauth session & refresh token lifetimes (#3883) 2025-06-14 14:25:11 +02:00
James Futhey
5072e5b811
Update README.md to add some missing details in examples (#3254)
Update README.md

Improve code examples (some OAuth implementation details are missing in these examples)
2025-06-14 14:15:44 +02:00
github-actions[bot]
71a0a026c1
Version packages (#3947)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-13 13:49:11 -05:00
Eric Bailey
7f1316748d
Add match: MuteWordMatch to muted-word mod decision cause (#2934)
* Return MuteWordMatch instead of simple boolean

* Return full mute word with match

* Add MuteWordMatch to decision cause, update a few tests

* Backwards compat

* Tighter types

* Return all mute word matches

* Clean up types

* Rename

* More cleanup of naming

* Remove unneeded changes

* Format

* Add predicate value to matches

* Better migration path

* Changeset

* Import sort

* Tighten up addMuteWord API

Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com>

* Mute words: handle `Andor` and `and/or` case (#3948)

* Handle Andor case

* Remove useless escape

* Changeset

---------

Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com>
2025-06-13 13:37:33 -05:00
rafael
6b07b4b08f
bsync: Accept NSID with fragment in operation ns (#3954) 2025-06-13 12:28:19 -03:00
Matthieu Sieben
349b59175e
Properly validate auth during refresh (#3847)
* Ensure that the credentials used during a refresh correspond to those used to create the OAuth tokens.

* tidy

* Bind the OAuth session to the kid that was used to authenticate the client (private_key_jwt)

* Store the whole authentication method in the client session store rather than the kid only

* tidy

* Improve error reporting in case an invalid `token_endpoint_auth_method` is used in the client metadata document.

* tidy

* tidy

* Improve JAR checks

* tidy

* changeset

* tidy

* Remove schema's `.optional()` modifier when a `.default()` is defined

* tidy

* verify client auth during code exchange

* tidy

* Minor naming improvement

* tidy

* Update .changeset/quiet-pans-fix.md

Co-authored-by: devin ivy <devinivy@gmail.com>

* Update packages/oauth/oauth-client/src/oauth-client-auth.ts

* Use `private_key_jwt` instead of incorrect `client_secret_jwt` as authentication method for confidential clients

* style

* code split

* dead code removal

* Represent missing client auth with a `null` instead of "none" when storing request data.

* Allow storing `null` in authorization_request's `clientAuth` json column

* document

* tidy

* Remove non-standard behavior that allowed client to authenticate through JAR

* Improved error messages

* Parse JSON encoded Authorization Request Parameters

* Use `application/x-www-form-urlencoded` content instead of JSON for OAuth requests

Fixes: #3723

* tidy

* tidy

* tidy

* tidy

* code style

* remove un-necessary checks

* tidy

* Pre-process number too

* improved type checking

* add missing exports

* fix merge conflict

* tidy

* Remove invalid default for `code_challenge_method` authorization request parameter

* tidy

* Delete inaccurate changeset

* PR comment

* tidy

* Update OAuth client credentials factory to return headers and payload separately.

* tidy

* Renamed `clientAuthCheck` to `validateClientAuth`

* Validate presence of DPoP proofs sooner when processing token requests.

Fixes: #3859

* Protect against concurrent use of request code

* tidy

* tidy

* Update packages/oauth/oauth-provider/src/client/client.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* Review comments

* Add missing `exp` claim in client attestation JWT

* fixup! Review comments

* Review comments

* Refactor: explicit optionality of unsigned JAR issuer & audience

* Use client attestation's `exp` claim to determine the life time of JWT's `jti` nonce.

* Fix PDS: consumeRequestCode should delete request data

* tidy

* tidy

* Unused code removal

* Restore "Native clients must authenticate using "none" method" check

* tidy

* tidy

* cleanup

* comment

* Allow missing DPoP header during PAR request if `dpop_jkt` is provided

* tidy

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2025-06-12 15:10:17 +02:00
github-actions[bot]
c2b57e3f65
Version packages (#3944)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-11 16:49:12 -05:00
rafael
3f07ffd3ef
Add field to NotificationPreferences proto msg (#3946) 2025-06-10 17:20:39 -03:00
Matthieu Sieben
0286f7ee3d
Refactor route rate limiter builder (#3886)
* Refactor route rate limiter builder

* Refactor RouteRateLimiter handle method to improve bypass logic and return type

* Use `redis` as rate limit db when available
2025-06-10 20:53:56 +02:00
Matthieu Sieben
809822ceeb fix pds build 2025-06-10 16:14:22 +02:00
rafael
dfdc8c8470
Add threads v2 seeds to dev-env seeds (#3911) 2025-06-10 10:57:04 -03:00
Matthieu Sieben
b675fbbf17
Return an error if the wrong HTTP verb is used for a known XRPC method (#3884) 2025-06-10 11:58:25 +02:00
Matthieu Sieben
192f3ab89c
Improve login_hint handling (#3933)
* Return atproto handle in identity resolution result

* Use resolved handle or did instead of raw input as "login_hint"

* Normalize and validate `login_hint` in oauth request properties
2025-06-10 11:57:49 +02:00
Matthieu Sieben
4e96e2c7b7
Remove iss claim from DPoP proofs (#3926) 2025-06-10 11:56:04 +02:00
Matthieu Sieben
30f851dee8
Fix footer links not working in account page (#3934)
Fixes: #3893
2025-06-10 11:55:51 +02:00
github-actions[bot]
93bf69df96
Version packages (#3936)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-06 20:20:02 -03:00
Samuel Newman
a48671e730
Notification preferences V2 endpoints (#3901)
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
Co-authored-by: rafael <rafael@blueskyweb.xyz>
2025-06-06 18:29:05 -03:00
Matthieu Sieben
cd4bed3c9e
Cache new nonces from successful retries (#3935)
* @atproto/oauth-client: cache new nonces from successful retries

* Add changeset

---------

Co-authored-by: Eli Mallon <eli@aquareum.tv>
2025-06-06 19:29:48 +02:00
github-actions[bot]
bd77a88d05
Version packages (#3931)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-06 11:49:33 -05:00