coinbase / coinbase/onchainkit

Bug: Unable to correctly obtain the user's FID in Base Mini App

Open
#2,546 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
520
Avg merge
32m
Merged PRs (30d)
2

Description

### Describe the bug and the steps to reproduce it

```typescript
await sdk.actions.ready();
await sdk.context.then((ctx: any) => {
signIn();
console.log(ctx, 'ctx');
setContext(ctx);
});
```

```json
{
"user": {
"fid": -1,
"username": "dummyaccount",
"displayName": "dummy testing account",
"pfpUrl": "https://farcaster.xyz/avatar.png"
},
"client": {
"clientFid": 309857,
"added": false,
"platformType": "web",
"safeAreaInsets": {
"top": 0,
"bottom": 34,
"left": 0,
"right": 0
}
}
}
```
### Error
> **AuthClientError: Valid FID is required for Sign In with Farcaster**

in farcaster
```json
{
"user": {
"fid": 1501133,
"username": "letooo",
"displayName": "letooo",
"pfpUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/6793598c-8068-49d9-986b-6f417e4fd300/rectcontain2",
"location": {
"placeId": "",
"description": ""
}
},
"client": {
"platformType": "web",
"clientFid": 9152,
"added": false
},
"features": {
"haptics": false,
"cameraAndMicrophoneAccess": false
}
}
```

### What's the expected behavior?

_No response_

### What version of the libraries are you using?

```json
"@coinbase/onchainkit": "^1.1.2",
"@farcaster/miniapp-sdk": "^0.2.1",
"@farcaster/quick-auth": "^0.0.8",
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.