Authentication
Public Handle data needs no sign-in. Anything done on behalf of a Handle holder, such as saving SubHandle settings, uses Handle Auth: a standard OAuth2 authorization-code flow with PKCE, hosted at auth.handle.me. The holder proves ownership by signing a message with their wallet. No transaction is sent and no funds move.
Before you start
Register your application at auth.handle.me under "Registered Apps" to get a client ID (public) and a client secret (keep private). Steps are in Adding an Auth App.
The sign-in flow
- Create a random
code_verifierand send the holder's browser tohttps://auth.handle.me/authorizewithclient_id,state,response_type=code,code_challenge(the hash of your verifier) andcode_challenge_method. - The holder sees what your app is asking for, connects their wallet and approves by signing.
- Their browser returns to your registered approval URL with
code,stateandhandle. Check thatstatematches what you sent. - From your server, POST to
https://auth.handle.me/tokenwithclient_id, thehandle, thecodeand yourcode_verifier. The reply holds anaccess_tokenand arefresh_token. Use therefresh_tokengrant type to get a new pair later. - Send the
client_id,handleandaccess_tokenwith requests that act on the Handle, for example Vendor SubHandle Minting.
When it fails
- An unknown or missing
client_idshows an error and never redirects. - Other invalid requests from a registered app redirect to its failure URL with an
errorvalue. - Access ends if the holder no longer owns the Handle. Ask them to sign in again.
- Error responses carry a tracking ID (
x-user-issue-id); include it when asking for help.