About
Tool No. 74 of Pikkola, 26 November 2026
An OAuth login is a conversation between three parties that never meet in one place: your app, the provider, and the person signing in. The parts you can see are a redirect and a short code. The parts that decide whether the login is safe are a hash, a receipt and a lifetime, and those are the parts this page puts in front of you.
What it does
- Makes a PKCE pair with
crypto.getRandomValues, from 43 to 128 characters, and hashes it with crypto.subtle for the S256 challenge.
- Builds an authorize URL from the parameters each provider documents, and lists what is missing, unsafe or ignored.
- Reads a callback URL for code, state, error, iss, duplicate names and tokens where they should not be.
- Decodes an OpenID Connect ID token and checks its claims: issuer, audience, azp, expiry, issued at, nonce, at_hash and c_hash.
- Writes the token exchange as curl, fetch and Python, with the verifier already in place.
- Keeps each bench's result for the next one, so the challenge that went out is the verifier that comes back.
- Speaks English, Korean and Japanese. Nothing is uploaded, stored or sent.
The pair
A verifier is a random string from the unreserved character set of RFC 3986. This page draws bytes from the platform's cryptographic generator, throws away the bytes that would bias the last character of the alphabet, and fills the requested length. The challenge is the SHA-256 digest of the verifier in base64url without padding, which is 43 characters, and that is what goes into the URL. The verifier itself is meant for the token request and nowhere else.
The check box works in the other direction: give it a verifier and a challenge and it says whether one produced the other. It is the same function the benches use, so a pair accepted here is a pair the flow will accept. The RFC 7636 example is one click away, which is a useful way to see that the tool and the specification agree.
The URL
Seven providers, each with the endpoints and the parameter set it documents. Google, Kakao, Microsoft and a generic OpenID provider take a challenge and a nonce. GitHub takes a challenge and no nonce, because it is not an OpenID provider. Apple answers by form post and its client secret is a signed JWT. Naver documents neither PKCE nor an OpenID scope, and requires state. The builder follows the provider rather than a single ideal request, and says so when the provider's answer differs from the ideal.
Warnings are graded. An error is something a provider will reject or a browser will break: a fragment in the redirect URI, plain http outside loopback, an implicit response type, a verifier in the URL. A warning is something that works today and fails later: a short state, a placeholder client id, duplicated parameters. A note is information: Apple's form post was added for you, a loopback redirect is allowed for a desktop client.
The answer
A callback is read before the code is used, not after. The page separates the query from the fragment, because a token in the fragment means the implicit flow, and lists duplicate names, because two code parameters mean two possible codes. An error is reported with its standard meaning. The state is compared only when you paste the value you kept, and the page says plainly when it was not compared at all.
An ID token is decoded, not verified. Every claim is listed with the time it refers to in plain language, and the checks that catch the usual mistakes run against the values you provide. The signature check is missing on purpose: it needs the provider's keys and a verified crypto library on a server, and pretending to do it here would be worse than saying that it was not done.
The exchange
The token request is printed as three snippets with the same fields: grant_type, code, redirect_uri, code_verifier and the client identity. A public client sends no secret. A confidential client sends one, either in the body or through basic authentication, and the page keeps the secret a placeholder because it belongs in the server's environment and not in a page that writes snippets.
What it is not
It is not an OAuth library and it does not talk to a provider. It does not fetch discovery documents, does not open the authorize URL, does not exchange a code, and does not keep a token. It cannot tell you whether your provider will accept a redirect URI until that provider says so. It reads the values the way a careful reviewer reads them, and it names the thing it could not check.
Contact
Corrections to a provider's parameters are welcome, especially with a link to the documentation: hello@pikkola.com.
소개
피콜라 74번 도구, 2026년 11월 26일
OAuth 로그인은 한자리에 모이지 않는 셋의 대화입니다. 내 앱, 프로바이더, 그리고 로그인하는 사람. 눈에 보이는 것은 리다이렉트와 짧은 코드뿐이고, 로그인이 안전한지를 가르는 것은 해시 하나와 영수증 하나와 수명입니다. 이 페이지는 그 부분을 앞에 놓습니다.
하는 일
crypto.getRandomValues로 43자에서 128자의 PKCE 쌍을 만들고, S256 challenge는 crypto.subtle로 해시합니다.
- 프로바이더가 문서화한 파라미터로 인가 URL을 조립하고, 빠진 것과 위험한 것과 무시될 것을 나눠 알립니다.
- 콜백 URL에서 code, state, error, iss, 중복 이름, 있어서는 안 될 자리의 토큰을 읽습니다.
- OpenID Connect ID 토큰을 풀어 iss, aud, azp, 만료, 발급 시각, nonce, at_hash, c_hash를 확인합니다.
- 토큰 교환을 curl, fetch, Python으로 적어 주고, verifier를 미리 넣어 둡니다.
- 작업대의 결과를 다음 작업대로 넘겨서, 나간 challenge와 돌아온 verifier가 같은 쌍이 되게 합니다.
- 영어, 한국어, 일본어로 동작합니다. 보내거나 저장하는 것은 없습니다.
쌍
verifier는 RFC 3986의 비예약 문자로 이루어진 난수 문자열입니다. 이 페이지는 플랫폼의 암호학적 생성기에서 바이트를 받아, 알파벳 마지막 글자에 쏠림이 생길 바이트를 버리고 요청한 길이를 채웁니다. challenge는 verifier의 SHA-256 다이제스트를 패딩 없이 base64url로 적은 43자이고, URL에는 이것이 들어갑니다. verifier 자체는 토큰 요청 말고 다른 곳에 갈 일이 없습니다.
확인 상자는 반대 방향으로 동작합니다. verifier와 challenge를 주면 하나가 다른 하나를 만들었는지 답합니다. 작업대가 쓰는 함수와 같으므로, 여기서 통과한 쌍은 흐름에서도 통과합니다. RFC 7636 예제가 한 번의 클릭 거리에 있고, 도구와 규격이 같은 답을 내는지 보기에 좋습니다.
URL
프로바이더 일곱 개, 각각 문서화한 엔드포인트와 파라미터로 조립합니다. 구글과 카카오와 마이크로소프트와 일반 OpenID 프로바이더는 challenge와 nonce를 받습니다. GitHub은 OpenID 프로바이더가 아니라서 challenge는 받고 nonce는 받지 않습니다. Apple은 form post로 답하고 클라이언트 시크릿이 서명한 JWT이며, 네이버가 문서화한 흐름에는 PKCE도 OpenID scope도 없고 state가 필수입니다. 조립기는 하나의 이상적인 요청이 아니라 프로바이더를 따르고, 이상과 다르면 그 사실을 적습니다.
경고에는 등급이 있습니다. 오류는 프로바이더가 거부하거나 브라우저가 깨뜨릴 것입니다. redirect_uri의 프래그먼트, 루프백이 아닌 http, implicit response_type, URL에 들어간 verifier가 그렇습니다. 경고는 오늘은 되고 나중에 깨질 것입니다. 짧은 state, 예시값 client_id, 중복 파라미터가 그렇습니다. 참고는 정보입니다. Apple의 form post를 대신 넣었다든지, 데스크톱 클라이언트에는 루프백이 허용된다든지.
응답
콜백은 코드를 쓰기 전에 읽습니다. 쿼리와 프래그먼트를 나눠 보는 이유는 프래그먼트의 토큰이 implicit 흐름을 뜻하기 때문이고, 중복 이름을 세는 이유는 code가 둘이면 코드도 둘이기 때문입니다. 오류는 표준 의미와 함께 알립니다. state는 남겨 둔 값을 넣었을 때만 비교하고, 비교하지 않았으면 그렇다고 적습니다.
ID 토큰은 풀어 보는 것이지 검증하는 것이 아닙니다. 클레임을 시간과 함께 풀어 읽고, 흔한 실수를 잡는 검사를 넣은 값에 대고 돌립니다. 서명 검사가 없는 것은 의도입니다. 프로바이더의 키와 검증용 라이브러리가 서버에 있어야 하고, 여기서 흉내 내는 것은 하지 않았다고 말하는 것보다 나쁩니다.
교환
토큰 요청은 같은 필드를 담은 세 가지 스니펫으로 나옵니다. grant_type, code, redirect_uri, code_verifier, 그리고 클라이언트의 신원입니다. public 클라이언트는 시크릿을 보내지 않습니다. confidential 클라이언트는 본문이나 기본 인증으로 보내고, 이 페이지는 시크릿 자리에 자리표시자를 둡니다. 시크릿은 서버의 환경 변수에 있어야 하고, 스니펫을 적는 페이지에 있어서는 안 되기 때문입니다.
아닌 것
OAuth 라이브러리가 아니고 프로바이더와 통신하지 않습니다. 디스커버리 문서를 받지 않고, 인가 URL을 열지 않고, 코드를 교환하지 않고, 토큰을 보관하지 않습니다. 이 redirect_uri를 프로바이더가 받을지는 그 프로바이더만 압니다. 이 페이지는 리뷰어가 읽듯 값을 읽고, 확인하지 못한 것은 확인하지 못했다고 적습니다.
연락
프로바이더 파라미터에 대한 정정은 환영합니다. 문서 링크를 함께 주시면 더 좋습니다: hello@pikkola.com.
概要
Pikkola の 74 番目の道具、2026 年 11 月 26 日
OAuth のログインは、一か所に集まらない三者会話です。アプリ、プロバイダ、そしてサインインする人。目に見えるのはリダイレクトと短いコードだけで、ログインが安全かどうかを決めるのはハッシュ一つ、領収書一つ、寿命です。このページはその部分を前に出します。
すること
crypto.getRandomValues で 43 から 128 文字の PKCE の組を作り、S256 の challenge は crypto.subtle でハッシュします。
- 各プロバイダが定めるパラメータで認可 URL を組み立て、足りないもの、危ないもの、無視されるものを分けて伝えます。
- コールバック URL から code、state、error、iss、重複した名前、あるべきでない場所のトークンを読みます。
- OpenID Connect の ID トークンを開き、iss、aud、azp、期限、発行時刻、nonce、at_hash、c_hash を確かめます。
- トークン交換を curl、fetch、Python で書き、verifier をあらかじめ入れておきます。
- 作業台の結果を次へ渡し、出て行った challenge と戻ってきた verifier が同じ組になるようにします。
- 英語、韓国語、日本語で動きます。送るものも保存するものもありません。
組
verifier は RFC 3986 の非予約文字からなる乱数の文字列です。このページは動作環境の暗号乱数からバイトを取り、アルファベットの最後の文字が偏るバイトを捨てて、求められた長さを満たします。challenge は verifier の SHA-256 ダイジェストを詰め物なしの base64url で書いた 43 文字で、URL に入るのはこちらです。verifier そのものはトークン要求以外へ出るものではありません。
確認の欄は逆向きに働きます。verifier と challenge を渡すと、片方がもう片方を作ったかを答えます。作業台と同じ関数なので、ここを通った組は流れでも通ります。RFC 7636 の例が一回のクリック先にあり、道具と仕様が同じ答えを出すのを見るのに向いています。
URL
七つのプロバイダを、それぞれが定めるエンドポイントとパラメータで組み立てます。Google、カカオ、マイクロソフト、汎用の OpenID プロバイダは challenge と nonce を受けます。GitHub は OpenID プロバイダではないので challenge を受け、nonce は受けません。Apple は form post で答え、クライアント秘密は署名した JWT です。Naver の文書化された流れには PKCE も OpenID scope もなく、state が必須です。組み立て器は一つの理想ではなくプロバイダに従い、理想と違えばそう書きます。
警告には段階があります。エラーはプロバイダが断るかブラウザが壊すものです。redirect_uri のフラグメント、ループバック以外の http、implicit の response_type、URL に入った verifier がそれです。警告は今日は動いて後で壊れるものです。短い state、例の値の client_id、重複したパラメータがそれです。メモは情報です。Apple の form post を代わりに入れた、デスクトップのクライアントにはループバックが許される、といったことです。
応答
コールバックはコードを使う前に読みます。クエリとフラグメントを分けるのは、フラグメントのトークンが implicit 流れを意味するからで、重複した名前を数えるのは、code が二つならコードも二つだからです。エラーは標準の意味とともに伝えます。state は手元に残した値を入れたときだけ比べ、比べていないときはそう書きます。
ID トークンは開くのであって、検証するのではありません。クレームを時刻とともに読み、よくある間違いを捕まえる確認を、入れた値に対して走らせます。署名の確認が無いのは意図です。プロバイダの鍵と検証用のライブラリがサーバに要り、ここで真似るのは、やっていないと言うより悪いことです。
交換
トークン要求は同じ項目を持つ三つの断片として出ます。grant_type、code、redirect_uri、code_verifier、そしてクライアントの身元です。public クライアントは秘密を送りません。confidential クライアントは本文か基本認証で送り、このページは秘密の場所に目印を置きます。秘密はサーバの環境変数に置くもので、断片を書くページに置くものではないからです。
そうではないもの
OAuth ライブラリではなく、プロバイダと通信しません。ディスカバリ文書を取らず、認可 URL を開かず、コードを交換せず、トークンを保管しません。この redirect_uri を受け付けるかは、そのプロバイダだけが知っています。このページはレビューする人のように値を読み、確かめられなかったことは確かめられなかったと書きます。
連絡
プロバイダのパラメータへの訂正は歓迎します。文書へのリンクがあると助かります: hello@pikkola.com.