Skip to content

phonelink-sdk/phonelink

Repository files navigation

phonelink

Phone number verification for web and mobile apps.

npm license

Install

npm install phonelink

Quick start

import { phonelink } from "phonelink/web";

// Start the verification flow
phonelink.startVerify("your-client-id", "https://myapp.com/callback");

// On the callback page, get the result
const result = phonelink.getRedirectResult();

// Send to your server for verification
await fetch("/api/verify", {
  method: "POST",
  body: JSON.stringify({ token: result.token, nonce: result.nonce }),
});
import { validate } from "phonelink/validate";

const payload = await validate(token, nonce, "your-client-id");
console.log(payload.phone_e164); // "+14155551234"

Documentation

Read the full documentation at docs.phone.link

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors