You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs.md
+66-94Lines changed: 66 additions & 94 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -343,42 +343,39 @@ Before integrating Base Verify, you need:
343
343
2.**A mini app** - Your app should run in Coinbase Wallet or Base ecosystem
344
344
3.**Wallet integration** - Users must be able to connect and sign messages
345
345
346
-
### Key Types
346
+
### API Keys
347
347
348
-
You'll receive two types of keys:
348
+
You'll receive a **Secret Key** from the Base Verify team.
349
349
350
-
**Publisher Key** (Public)
351
-
- Safe to expose in client-side code
352
-
- Used for client-to-API calls
353
-
- Requires origin validation (your app domain must be allowlisted)
354
-
- Format: `pub_...`
355
-
356
-
**Secret Key** (Private)
357
-
- NEVER expose to clients
358
-
- Used only on your backend server
359
-
- For privileged operations (verification checks, token generation)
350
+
**Secret Key:**
351
+
-**NEVER expose to clients or frontend code**
352
+
- Must only be used on your backend server
353
+
- Used for all API calls to Base Verify
360
354
- Format: `sec_...`
361
355
356
+
**Security Warning:** If you accidentally expose your secret key in frontend code, browser dev tools, or version control, contact the Base Verify team immediately to rotate it.
357
+
362
358
### Registering Your App
363
359
364
-
When you receive your keys, you'll also need to register:
360
+
When you receive your key, you'll also need to register:
365
361
366
362
1.**Redirect URIs** - Where users return after verification (e.g., `https://yourapp.com`)
367
-
2.**Allowed Origins** - Domains that can make client-side API calls (if using publisher key)
368
-
3.**App Name** - How your app appears in the Base Verify flow
363
+
2.**App Name** - How your app appears in the Base Verify flow
369
364
370
365
Contact the Base Verify team to register these settings.
371
366
372
367
---
373
368
374
369
## Integration Steps
375
370
371
+
> **Security Warning:** Your Base Verify secret key must NEVER be exposed in frontend code, browser console, or version control. All Base Verify API calls must go through your backend server. If your key is compromised, contact the Base Verify team immediately.
372
+
376
373
The integration involves several components working together:
377
374
378
-
1.**SIWE Message Generation** - Create signed messages proving wallet ownership
379
-
2.**Verification Check** - Call Base Verify API to check status
380
-
3.**Redirect Handling** - Send users to Base Verify when needed
381
-
4.**Token Storage** - Store verification tokens to prevent reuse
375
+
1.**SIWE Message Generation**(Frontend) - Create signed messages proving wallet ownership
376
+
2.**Verification Check**(Backend) - Call Base Verify API to check status
377
+
3.**Redirect Handling**(Frontend) - Send users to Base Verify when needed
378
+
4.**Token Storage**(Backend) - Store verification tokens to prevent reuse
**Important:** This endpoint must only be called from your backend. Never expose your secret key in frontend code.
565
574
566
575
**Request:**
567
576
@@ -810,7 +819,7 @@ The interactive examples let you test real API calls to Base Verify:
810
819
- Test your own verification status
811
820
- Debug trait requirements before implementing
812
821
813
-
**Note:** These examples use a publisher key (safe for client-side), so they work directly from your browser.
822
+
**Note:** These examples call Base Verify API directly from your browser for demo purposes. In production, you should proxy all Base Verify API calls through your backend to keep your secret key secure.
814
823
815
824
---
816
825
@@ -1054,44 +1063,20 @@ Every API call requires a valid SIWE signature from the wallet owner. This preve
1054
1063
- Third parties checking if a wallet is verified
1055
1064
- Enumeration attacks
1056
1065
1057
-
**2. Origin Validation**
1058
-
1059
-
Publisher keys (client-side) are locked to specific origins:
1060
-
- Only your registered domains can use your publisher key
1061
-
- Prevents key theft and misuse
1062
-
- Enforced at the API level
1063
-
1064
-
**3. OAuth Token Security**
1066
+
**2. OAuth Token Security**
1065
1067
1066
1068
- OAuth access tokens are encrypted at rest
1067
1069
- Never exposed to your application
1068
1070
- Used only by Base Verify to refresh provider data
1069
1071
- Can be revoked by user at any time
1070
1072
1071
-
**4. User Control**
1073
+
**3. User Control**
1072
1074
1073
1075
Users can delete their verifications at any time:
1074
1076
- Removes all stored provider data
1075
1077
- Invalidates future token generation
1076
1078
- Your app's stored tokens become meaningless (user can't re-verify with same account)
1077
1079
1078
-
### Rate Limits
1079
-
1080
-
To prevent abuse, Base Verify enforces rate limits:
1081
-
1082
-
| Endpoint | Rate Limit | Per |
1083
-
| :---- | :---- | :---- |
1084
-
|`/v1/base_verify_token`| 100 requests | per minute per API key |
1085
-
|`/v1/verification_url`| 50 requests | per minute per API key |
1086
-
|`/v1/verifications`| 100 requests | per minute per API key |
1087
-
1088
-
If you exceed rate limits, you'll receive a `429 Too Many Requests` response.
1089
-
1090
-
**Best Practices:**
1091
-
- Cache verification results client-side (for the session)
1092
-
- Don't check verification on every page load
1093
-
- Implement exponential backoff on retries
1094
-
1095
1080
### OAuth Security Model
1096
1081
1097
1082
**How Base Verify validates provider accounts:**
@@ -1105,19 +1090,6 @@ If you exceed rate limits, you'll receive a `429 Too Many Requests` response.
1105
1090
1106
1091
**Your app never handles OAuth tokens or redirects.** This is all handled within the Base Verify Mini App.
1107
1092
1108
-
### Compliance
1109
-
1110
-
-**GDPR**: Users can request deletion of their verification data
1111
-
-**CCPA**: Users have right to know what data is stored and can delete it
1112
-
-**Data Minimization**: Only essential provider data is stored
1113
-
1114
-
### Reporting Security Issues
1115
-
1116
-
If you discover a security vulnerability, please email:
0 commit comments