npm.io
1.1.10 • Published yesterday

@clerk/expo-passkeys

Licence
MIT
Version
1.1.10
Deps
1
Size
476 kB
Vulns
0
Weekly
0
Stars
1.7K


@clerk/expo-passkeys

Prerequisites

Usage

import { ClerkProvider } from '@clerk/expo';
import { passkeys } from '@clerk/expo/passkeys';

<ClerkProvider __experimental_passkeys={passkeys}>{/* Your app here */}</ClerkProvider>;
Creating a Passkey
const { user } = useUser();

const handleCreatePasskey = async () => {
  if (!user) return;
  try {
    return await user.createPasskey();
  } catch (e: any) {
    // handle error
  }
};
Authenticating with a Passkey
const { signIn, setActive } = useSignIn();

const handlePasskeySignIn = async () => {
  try {
    const signInResponse = await signIn.authenticateWithPasskey();
    await setActive({ session: signInResponse.createdSessionId });
  } catch (err: any) {
    // handle error
  }
};

Support

For help, visit our support page.

Community

Join our Discord community to connect with other developers.

Contributing

We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.

Security

@clerk/expo-passkeys follows good practices of security, but 100% security cannot be assured.

@clerk/expo-passkeys is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the MIT license.

See LICENSE for more information.

Keywords