diff --git a/oauth.md b/oauth.md index 7492961..9c3e7e0 100644 --- a/oauth.md +++ b/oauth.md @@ -25,3 +25,23 @@ PDS_PUBLIC_URL=https://syu.is curl -s https://syu.is/.well-known/oauth-authorization-server |jq . curl -s "https://syu.is/oauth/authorize?client_id=https://syui.ai/client-metadata.json&response_type=code&redirect_uri=https://syui.ai/oauth/callback" ``` + +## 裏でblueskyのserverを使って名前解決を行っている + +現在のatproto-oauthは裏でblueskyのserverを使います。ですから、例えば、plc.directoryに登録されていないと成功しません。 + +```sh +# handle changeを行ったあとに更新されずdidでしかoauthできない。異なる名前で登録されている例 + +# did:plc:6qyecktefllvenje24fcxnie ...ok +# ai.syu.is ... ok +# ai.syui.ai ... no + +$ curl -sL "https://syu.is/xrpc/com.atproto.identity.resolveHandle?handle=ai.syui.ai" |jq -r .did +did:plc:6qyecktefllvenje24fcxnie + +$ curl -sL "https://plc.directory/did:plc:6qyecktefllvenje24fcxnie" | jq '.alsoKnownAs' +[ + "at://ai.syu.is" +] +```