OAuth logout throws an exception
bugarea/atproto/oauth
# Bug report
## Details
When attempting to logout with an OAuth authenticated session an exception is thrown.
### Describe the bug
An exception is thrown when calling `agent.Logout()` when authenticated via OAuth.
```
Unhandled exception: idunno.AtProto.LogoutException: Exception of type 'idunno.AtProto.LogoutException' was thrown.
at idunno.AtProto.AtProtoAgent.Logout(CancellationToken cancellationToken) in G:\idunno.Bluesky\src\idunno.AtProto\Authentication\AtProtoAgent.cs:line 817
at Samples.ConsoleShellOAuth.Program.PerformOperations(String loginHandle, Uri proxyUri, CancellationToken cancellationToken) in G:\idunno.Bluesky\samples\Samples.ConsoleShellOAuth\Program.cs:line 126
at Samples.ConsoleShellOAuth.Program.PerformOperations(String loginHandle, Uri proxyUri, CancellationToken cancellationToken) in G:\idunno.Bluesky\samples\Samples.ConsoleShellOAuth\Program.cs:line 126
at System.CommandLine.Command.<>c__DisplayClass32_0.<<SetAction>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
```
The revoke endpoint, https://bsky.social/oauth/revoke, responds with
HTTP/2 401
date: Sun, 28 Sep 2025 14:48:11 GMT
content-type: application/json
x-powered-by: Express
access-control-allow-origin: *
access-control-max-age: 86400
access-control-allow-methods: *
access-control-allow-headers: Content-Type,DPoP
cache-control: no-store
pragma: no-cache
dpop-nonce: W08iptlWQlzIZ_rzk37XAIdLhNT7fJpch7T2sdZVSTc
access-control-expose-headers: DPoP-Nonce
access-control-expose-headers: WWW-Authenticate
www-authenticate: DPoP algs="RS256 RS384 RS512 PS256 PS384 PS512 ES256 ES256K ES384 ES512", error="invalid_dpop_proof"
vary: Accept-Encoding
{"error":"invalid_dpop_proof","error_description":"DPoP \"ath\" claim not allowed"}
### Expected behavior
No exception is thrown and the refresh token, then the access token are revoked.
## Helpful Extra information
### What operating system(s) are you using?
- [X] Windows
- [ ] macOS
- [ ] Ubuntu
- [ ] Other Linux
- [ ] Other (specify below)
关闭于 2025-09-30 0 条评论