GitHub
You can associate your GitHub account with your DEMOS address using one of two methods:- OAuth Flow (Recommended) - Seamless authentication through the Key Server OAuth system
- Gist-based Verification - Manual proof creation via GitHub Gist
Method 1: OAuth Flow (Recommended)
The OAuth flow provides a seamless user experience by authenticating through the Key Server, which handles the GitHub OAuth process and provides cryptographic attestation.For detailed information about the Key Server OAuth system, including attestation verification and error handling, see the Key Server OAuth documentation.
1. Verify GitHub Account Ownership
Use theKeyServerClient to verify the user owns a GitHub account:
2. Submit Identity Transaction
After successful verification, use the attestation to create an identity transaction:3. Verify Attestation (Optional)
You can cryptographically verify the attestation before submitting:The OAuth attestation is cryptographically signed by the Key Server, ensuring the identity verification is authentic. See Attestation Verification for details.
Method 2: Gist-based Verification
This method requires manually creating a public gist containing a cryptographic proof.1. Connect your wallet
2. Generate the proof payload
To link your GitHub account to your DEMOS address, you need to create a public gist containing a proof on your GitHub. The proof is a string that contains a message, a signature and your public key. You can generate a proof as shown below:3. Send an identity request
After creating the gist, copy the gist url and use it to create an identity transaction as shown below:- Raw gist url: https://gist.githubusercontent.com/cwilvx/abf8db960c16dfc7f6dc1da840852f79/raw/224478424c5e6e51f5eb60cb6aeea278d3418742/gistfile1.txt
- Raw proof file in a GitHub repo url: https://raw.githubusercontent.com/cwilvx/vonage-draft-images/refs/heads/master/proof.txt
Getting linked web2 accounts
After the confirmation block has been forged, you can retrieve all your linked accounts as shown:Removing linked GitHub identity
You can create a transaction to remove your linked GitHub account as shown:Comparison of Methods
| Feature | OAuth Flow | Gist-based |
|---|---|---|
| User Experience | Seamless, one-click | Manual gist creation |
| Cryptographic Attestation | DAHR attestation with signature | Proof in gist |
| Verification Speed | Instant | Requires gist fetch |
| Best For | Production apps | Development/testing |