2352 Commits

Author SHA1 Message Date
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>
@atproto-labs/identity-resolver@0.1.18 @atproto-labs/xrpc-utils@0.0.16 @atproto/bsky@0.0.158 @atproto/dev-env@0.3.141 @atproto/oauth-client-browser@0.3.22 @atproto/oauth-client-node@0.2.23 @atproto/oauth-client@0.3.22 @atproto/oauth-provider-frontend@0.1.7 @atproto/oauth-provider@0.8.1 @atproto/ozone@0.1.119 @atproto/pds@0.4.147 @atproto/sync@0.1.25 @atproto/xrpc-server@0.8.0
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>
@atproto/api@0.15.14 @atproto/bsky@0.0.157 @atproto/dev-env@0.3.140 @atproto/oauth-client-browser@0.3.21 @atproto/oauth-client-node@0.2.22 @atproto/oauth-client@0.3.21 @atproto/ozone@0.1.118 @atproto/pds@0.4.146
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>
@atproto/api@0.15.13 @atproto/bsky@0.0.156 @atproto/dev-env@0.3.139 @atproto/ozone@0.1.117 @atproto/pds@0.4.145
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>
@atproto-labs/xrpc-utils@0.0.15 @atproto/bsky@0.0.155 @atproto/dev-env@0.3.138 @atproto/jwk-jose@0.1.7 @atproto/jwk-webcrypto@0.1.7 @atproto/jwk@0.2.0 @atproto/oauth-client-browser@0.3.20 @atproto/oauth-client-node@0.2.21 @atproto/oauth-client@0.3.20 @atproto/oauth-provider-api@0.1.3 @atproto/oauth-provider-frontend@0.1.6 @atproto/oauth-provider-ui@0.1.8 @atproto/oauth-provider@0.8.0 @atproto/oauth-types@0.2.8 @atproto/ozone@0.1.116 @atproto/pds@0.4.144 @atproto/sync@0.1.24 @atproto/xrpc-server@0.7.19
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>
@atproto/dev-env@0.3.137 @atproto/oauth-provider-ui@0.1.7 @atproto/oauth-provider@0.7.10 @atproto/pds@0.4.143
2025-06-04 13:35:53 +02:00
rafael
b9616f63bf
[bsync] Rename operation endpoint properties (#3921) 2025-06-03 14:23:35 -03: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
Matthieu Sieben
8fa2502e80
Require manual invocation of i18n:extract (#3918)
Currently, the `lingui extract` command is being run as part of the `build` and `dev` commands. This causes very large diffs in PRs, even when no change are made to `.po` files.

With this change, only running `pnpm i18n` (from the root folder), or `pnpm i18n:extract` (from ui libs that support it) will cause the PO files to be re-computed.
2025-06-02 19:18:33 +02:00
Foysal Ahamed
e2f1dfd3da
Fix flaky team test in ozone suite (#3917) 2025-06-02 16:45:02 +02:00
github-actions[bot]
45e8717e19
Version packages (#3914)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@atproto/api@0.15.12 @atproto/bsky@0.0.154 @atproto/bsync@0.0.20 @atproto/dev-env@0.3.136 @atproto/ozone@0.1.115 @atproto/pds@0.4.142
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>
@atproto/api@0.15.11 @atproto/bsky@0.0.153 @atproto/dev-env@0.3.135 @atproto/lex-cli@0.8.2 @atproto/oauth-provider@0.7.9 @atproto/ozone@0.1.114 @atproto/pds@0.4.141
2025-05-29 15:27:40 -03:00
rafael
a978681fde
changeset (#3910) 2025-05-29 15:20:29 -03:00
rafael
f6d5a467e7
Fix handling following users in threads v2 (#3909) 2025-05-29 13:01:11 -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
rafael
cb8bf1838f
app.bsky.unspecced.getPostThreadV2 filtering (#3905) 2025-05-29 00:32:11 -03:00
Foysal Ahamed
498f3c0738
🐛 Fetch record from pds if appview fails to find it for ozone (#3892)
* 🐛 Fetch record from pds if appview fails to find it for ozone

*  Resolve and etch from pds without auth

* ♻️ Refactor and cleanup

*  Fix tests

*  Fix tests

* 🚨 Fix linter issue

* 🧹 Cleanup
2025-05-28 21:39:28 +02:00
Jim Calabro
e474623d3f
Add Generic Bsync Proto (#3887)
Co-authored-by: rafael <rafael@blueskyweb.xyz>
2025-05-28 11:37:04 -03:00
Foysal Ahamed
37b5a4ef29
🐛 Add missing union ref to ozone mod subject (#3605) 2025-05-28 10:30:54 +02:00
Foysal Ahamed
fe2a1d12bb
🐛 Add datetime format in lexicon def for createdAt field on grantVerification input (#3829) 2025-05-28 10:30:43 +02:00
github-actions[bot]
bae3ef91fc
Version packages (#3897)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@atproto/api@0.15.10 @atproto/bsky@0.0.152 @atproto/dev-env@0.3.134 @atproto/oauth-client-browser@0.3.19 @atproto/oauth-client-node@0.2.20 @atproto/oauth-client@0.3.19 @atproto/ozone@0.1.113 @atproto/pds@0.4.140
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) @atproto/api@0.15.9 @atproto/bsky@0.0.151 @atproto/dev-env@0.3.133 @atproto/oauth-client-browser@0.3.18 @atproto/oauth-client-node@0.2.19 @atproto/oauth-client@0.3.18 @atproto/oauth-provider-frontend@0.1.5 @atproto/oauth-provider-ui@0.1.6 @atproto/oauth-provider@0.7.8 @atproto/ozone@0.1.112 @atproto/pds@0.4.139 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
Johannes Andersen
ba293da9fe
feat: password reset discovery and sign-in/up autofill (#3888)
* feat: password reset discovery and sign-in/up autofill

* chore: update translation files
2025-05-26 13:42:54 +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
bnewbold
24e20b96c6
lexicons: update searchPosts to indicate it isn't always available publicly (#3844)
* update searchPost description to clarify it may or may not be public

* codegen
2025-05-20 21:04:40 -07:00
github-actions[bot]
0a2c30dd97
Version packages (#3872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@atproto-labs/did-resolver@0.1.13 @atproto-labs/fetch-node@0.1.9 @atproto-labs/fetch@0.2.3 @atproto-labs/handle-resolver-node@0.1.16 @atproto-labs/identity-resolver@0.1.17 @atproto-labs/pipe@0.1.1 @atproto/api@0.15.8 @atproto/bsky@0.0.150 @atproto/dev-env@0.3.132 @atproto/oauth-client-browser-example@0.0.4 @atproto/oauth-client-browser@0.3.17 @atproto/oauth-client-node@0.2.18 @atproto/oauth-client@0.3.17 @atproto/oauth-provider-ui@0.1.5 @atproto/oauth-provider@0.7.7 @atproto/ozone@0.1.111 @atproto/pds@0.4.138
2025-05-20 15:15:10 -07:00
hailey
80f402f366
add reqId to interactions (#3869) 2025-05-20 14:45:19 -07:00