-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Which area(s) of Hypercerts are affected? (leave empty if unsure)
SDK
To Reproduce
1, Set up the SDK instance with a PDS url
const sdk = createATProtoSDK({
oauth: {
clientId: `${process.env.NEXT_PUBLIC_APP_URL}/client-metadata.json`,
redirectUri: `${process.env.NEXT_PUBLIC_APP_URL}/api/auth/callback`,
scope: "atproto transition:generic",
jwksUri: `${process.env.NEXT_PUBLIC_APP_URL}/jwks.json`,
jwkPrivate: process.env.ATPROTO_JWK_PRIVATE,
},
storage: {
sessionStore,
stateStore,
},
servers: {
pds: "https://shiitake.us-east.host.bsky.network",
},
});
- Authenticate on using the sdk with an account that is not on the PDS provided when creating the SDK instance. i.e. for the above configuration authenticate with an account not on
https://shiitake.us-east.host.bsky.network.
Describe the Bug
Currently when we define the sdk instance we need to provider the pds url.
const sdk = createATProtoSDK({
oauth: {
clientId: `${process.env.NEXT_PUBLIC_APP_URL}/client-metadata.json`,
redirectUri: `${process.env.NEXT_PUBLIC_APP_URL}/api/auth/callback`,
scope: "atproto transition:generic",
jwksUri: `${process.env.NEXT_PUBLIC_APP_URL}/jwks.json`,
jwkPrivate: process.env.ATPROTO_JWK_PRIVATE,
},
storage: {
sessionStore,
stateStore,
},
servers: {
pds: "https://shiitake.us-east.host.bsky.network",
},
});
However this means that the sdk only works if the user has an account on the same PDS as the one configured in the sdk. And so it fails when a user logs in with an account on a different PDS.
Gives the above error
Expected Behavior
More of a feature request as well but the PDS url should be autodetected through the users session/did. And this would allow for accounts on different PDSs to still use the sdk for all the operations
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
