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
Before diving into the full integration, here's the absolute minimal example showing the core flow. This example checks if a wallet has verified an X account (no trait requirements).
220
220
221
-
**Note:** This uses the simple redirect flow. For production apps, consider the [PKCE flow](#option-b-pkce-flow-more-secure-recommended-for-production) for additional security.
222
-
223
221
### Step 1: Check Verification (Backend)
224
222
225
223
```typescript
@@ -520,9 +518,9 @@ async function checkVerification(address: string) {
520
518
} elseif (response.status===400) {
521
519
const data =awaitresponse.json();
522
520
if (data.message==='verification_traits_not_satisfied') {
523
-
return {
524
-
verified: false,
525
-
message: 'User does not meet trait requirements'
521
+
return {
522
+
verified: false,
523
+
message: 'User does not meet trait requirements'
526
524
}
527
525
}
528
526
}
@@ -537,8 +535,6 @@ async function checkVerification(address: string) {
537
535
538
536
**Runs on:** Frontend
539
537
540
-
#### Option A: Simple Redirect (Easier)
541
-
542
538
```ts
543
539
function redirectToVerifyMiniApp(provider:string) {
544
540
// Build mini app URL with your app as the redirect
@@ -555,118 +551,7 @@ function redirectToVerifyMiniApp(provider: string) {
555
551
}
556
552
```
557
553
558
-
After verification, user returns to your `redirect_uri` with `?success=true`. Just check verification again.
559
-
560
-
#### Option B: PKCE Flow (More Secure, Recommended for Production)
561
-
562
-
**PKCE (Proof Key for Code Exchange)** provides additional security by preventing authorization code interception.
0 commit comments