641 Commits

Author SHA1 Message Date
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
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
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
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
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
Eric Bailey
c6eb8a12e2
Update V2 additional replies naming convention (#3929)
* Rename

* Import sorting
2025-06-06 10:54:36 -05:00
Matthieu Sieben
598fcb693d
Log invalid use of "htu" DPoP proof claim (#3930) 2025-06-06 14:50:43 +02:00
github-actions[bot]
623c95d01e
Version packages (#3924)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-05 14:59:03 +02:00
Matthieu Sieben
3fa2ee3b6a
Deprecate query & fragment in DPoP proof htu claim (#3879)
* Properly validate JWK `htu` claim by enforcing URL without query or fragment

* type fix

* Return DPoP validation result from `authenticateRequest`

* Log clients using invalid "htu" claim in DPoP proof

* review comments

* fix lint

* tidy

* rename dpop result to dpop proof
2025-06-05 14:46:51 +02:00
Matthieu Sieben
a3b24ca77c
Use Form encoded body instead of JSON for OAuth requests (#3919)
* Parse JSON encoded Authorization Request Parameters

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

Fixes: #3723

* Pre-process number too

* improved type checking

* Update packages/oauth/oauth-client/src/oauth-server-agent.ts

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

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2025-06-05 14:15:42 +02:00
Matthieu Sieben
9214bd0170
Improve logging of XRPC errors (#3699)
* Improve logging of XRPC errors

* strip stack of non internal errors

* Review comments
2025-06-04 17:03:16 +02:00
github-actions[bot]
1919d10a22
Version packages (#3920)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-04 13:35:53 +02:00
Matthieu Sieben
71b9dcda96
Show account picker instead of welcome screen when user already signed-in (#3916)
* Show sign-in screen instead of welcome screen when user already signed-in
2025-06-03 10:10:42 +02:00
github-actions[bot]
45e8717e19
Version packages (#3914)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-31 16:37:17 -03:00
Eric Bailey
a5cd018bd5
Unify getPostThreadV2 and getPostThreadHiddenV2 responses (#3912)
Co-authored-by: rafael <rafael@blueskyweb.xyz>
2025-05-31 16:25:25 -03:00
github-actions[bot]
e05b38a727
Version packages (#3907)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-29 15:27:40 -03:00
rafael
a978681fde
changeset (#3910) 2025-05-29 15:20:29 -03:00
Samuel Newman
d880665e63
Fixed codegen for arrays of strings with known values (#3906)
* fix codegen for arrays of strings of knownValue

* changeset
2025-05-29 08:42:56 -07:00
Matthieu Sieben
06bf684a4a
Add max length limit to passwords (#3900)
* Add max length limit to passwords

* review changes
2025-05-29 14:15:45 +02:00
github-actions[bot]
bae3ef91fc
Version packages (#3897)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-27 21:31:22 -05:00
rafael
1dae6c59ab
Add app.bsky.unspecced.getPostThreadV2 (#3825)
Co-authored-by: Eric Bailey <git@esb.lol>
2025-05-27 22:12:12 -03:00
Matthieu Sieben
a03f0b906b
Remove un-necessary validation of alg on every dpop token creation (#3877) 2025-05-27 19:36:33 +02:00
github-actions[bot]
d6c40d6559
Version packages (#3878) 2025-05-26 22:04:18 +03:00
Samuel Newman
79a75bb1ed
Referred likes lexicon changes (#3882) 2025-05-26 19:28:59 +03:00
Matthieu Sieben
d1e3e68dd9 changeset 2025-05-26 13:45:09 +02:00
Matthieu Sieben
e939f8e466 Revert "Refactor route rate limiter builder"
This reverts commit da433bd0ca55c044c0e1c804717124a4ca40b791.
2025-05-23 14:51:39 +02:00
Matthieu Sieben
da433bd0ca Refactor route rate limiter builder 2025-05-23 14:50:52 +02:00
Matthieu Sieben
36d0d370c2 Remove query & fragment from DPoP proof htu claim
Fixes: https://github.com/bluesky-social/atproto/issues/3846
2025-05-21 17:21:26 +02:00
github-actions[bot]
0a2c30dd97
Version packages (#3872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-20 15:15:10 -07:00
hailey
80f402f366
add reqId to interactions (#3869) 2025-05-20 14:45:19 -07:00
Matthieu Sieben
8318c57187
Allow proxying of getSession using OAuth session (#3820)
* Allow proxying of dpop bound requests by using service auth instead, for the `getSession` endpoint.

* Show `getSession` data in example app

* Add  scope

* strings

* cleanup

* tidy

* tidy

* Add transition:email scope to example app

* strings

* changeset

* pr comments
2025-05-20 14:37:02 +02:00
Matthieu Sieben
36dbd41551
Fix potential memory leak (#3819)
* Fix potential memory leak

* pr comment
2025-05-20 14:08:16 +02:00
Matthieu Sieben
43861a452b
Remove dependency on the Public Suffix List (#3818)
* Remove dependency on the Public Suffix List

* tidy
2025-05-20 14:01:10 +02:00
Matthieu Sieben
5050b6550e
Allow implicit redirects in safe fetch wrap (#3821) 2025-05-20 13:36:38 +02:00
Matthieu Sieben
eab7c9fb8a
Use the PDS's hostname as fallback PDS "name" in the auth screen (#3868) 2025-05-20 13:32:48 +02:00
github-actions[bot]
f476003709
Version packages (#3854)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-16 17:20:57 -03:00
rafael
86b3153884
Add liveNow to app.bsky.unspecced.getConfig (#3860) 2025-05-16 17:01:37 -03:00
devin ivy
efc64ba925
pds: client ip relative to trusted ips (#3850)
* pds: client ip relative to trusted ips

* changeset
2025-05-13 12:29:13 -07:00
github-actions[bot]
251f661c00
Version packages (#3841)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-08 21:51:09 -04:00