Skip to content

Cannot use in-app passkey method #6934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Marielbamar21 opened this issue May 5, 2025 · 3 comments
Open

Cannot use in-app passkey method #6934

Marielbamar21 opened this issue May 5, 2025 · 3 comments
Assignees
Labels

Comments

@Marielbamar21
Copy link

Marielbamar21 commented May 5, 2025

Hi, I am integrating the in-app passkey method to my project, and when the connection function is executed it gives the following error:

Image

Image

the logic based on the documentation is:

function

import { inAppWallet, hasStoredPasskey } from "thirdweb/wallets/in-app";
import { useConnect } from "thirdweb/react";
import { client } from "@/provider/client";
const loginPasskey = async () => {
    try {
      await connect(async () => {
        const wallet = inAppWallet({
          auth: {
            options: ["passkey"],
            passkeyDomain: `localhost:3000`,
          },
        });
        const hasPasskey = await hasStoredPasskey(client);
        await wallet.connect({
          client,
          strategy: "passkey",
          type: hasPasskey ? "sign-in" : "sign-up",
        });
        return wallet;
      });
    } catch (error) {
      console.error(error, 'PASSKEY');
    }
  };

client


import { THIRDWEB_CLIENT_ID, THIRDWEB_PRIVATE_KEY } from '@/config';
import { createThirdwebClient } from 'thirdweb';

export const client = createThirdwebClient({
  clientId: THIRDWEB_CLIENT_ID,
  secretKey: THIRDWEB_PRIVATE_KEY,
});

I don't have a plan, for now I am using the free version for the development of the project. I don't know if it is some syntax error, or some configuration to do, or some error in the library. Thank you very much with what you can help me.

thirdweb version: 5.96.5

Copy link

linear bot commented May 5, 2025

@joaquim-verges
Copy link
Member

Hey @Marielbamar21 sorry for the late reply.

That error seems to indicate that the clientId passed to createThirdwebClient is empty or undefined. Can you double check you're passing the right value there?

Also if this is a frontend project, you only need clientId, no need to use secretKey (backend usage only)

@joaquim-verges joaquim-verges self-assigned this May 13, 2025
Copy link
Contributor

This issue has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.

@github-actions github-actions bot added the Stale label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants