npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@doordeck/headless-react-native-sdk

v0.86.0

Published

Doordeck React Native headless SDK

Readme

@doordeck/headless-react-native-sdk

Overview

The @doordeck/headless-react-native-sdk is a lightweight React Native SDK built on top of the Doordeck SDK. This SDK provides a minimal interface for authentication and lock management, focusing on user-facing operations. It enables React Native applications to authenticate users, manage authentication tokens, retrieve lock details, and unlock devices via Doordeck's platform.

Installation

To install the SDK, ensure you have React Native set up in your project, then add the necessary dependencies:

npm install @doordeck/headless-react-native-sdk

or using yarn:

yarn add @doordeck/headless-react-native-sdk

Usage

Importing the SDK

Import every single method according to your usage

import { login } from '@doordeck/headless-react-native-sdk';
// ...
import { logout } from '@doordeck/headless-react-native-sdk';

Authentication Methods

login(email: string, password: string): Promise<AssistedRegisterEphemeralKeyResponse>

Logs the user in with their email and password.

Note: If login is performed without verification within the same session, authentication will only persist in runtime memory and will be lost when the app restarts.

import { login } from '@doordeck/headless-react-native-sdk';

login("[email protected]", "password123")
  .then(response => console.log("Login successful", response))
  .catch(error => console.error("Login failed", error));

setAuthToken(authToken: string): Promise<AssistedRegisterEphemeralKeyResponse>

Sets an authentication token manually.

Note: Like login, authentication without verification will only persist in runtime memory and will be lost after the app restarts.

import { setAuthToken } from '@doordeck/headless-react-native-sdk';

setAuthToken("your-auth-token")
  .then(response => console.log("Token set successfully", response))
  .catch(error => console.error("Error setting token", error));

verify(code: string): Promise<void>

Verifies an ephemeral key registration with a verification code. Upon successful verification, the user ID and authentication context are saved in persistent storage.

import { verify } from '@doordeck/headless-react-native-sdk';

verify("123456")
  .then(() => console.log("Verification successful"))
  .catch(error => console.error("Verification failed", error));

logout(): Promise<void>

Logs out the current user and clears the stored authentication context, including removing the persistent user ID.

import { logout } from '@doordeck/headless-react-native-sdk';

logout()
  .then(() => console.log("Logged out"))
  .catch(error => console.error("Logout failed", error));

Device and Tile Operations

getLocksBelongingToTile(tileId: string): Promise<TileLocksResponse>

Retrieves a list of locks associated with a specific tile.

import { getLocksBelongingToTile } from '@doordeck/headless-react-native-sdk';

getLocksBelongingToTile("tile-uuid")
  .then(response => console.log("Locks: ", response))
  .catch(error => console.error("Failed to get locks", error));

unlockDevice(lockId: string): Promise<void>

Unlocks a device given its lock ID.

import { unlockDevice } from '@doordeck/headless-react-native-sdk';

unlockDevice("lock-uuid")
  .then(() => console.log("Device unlocked"))
  .catch(error => console.error("Unlock failed", error));

Error Handling

Each method returns a Promise. If an error occurs, the catch block will handle the failure, returning an error object containing an error code and message.

License

This SDK follows the Doordeck licensing agreement. Ensure compliance with Doordeck's API usage policies before integrating this SDK into your project.

Support

For additional support, refer to the Doordeck Developer Documentation.