privy-sdk
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

PRIVY SDK

Privy ID Software Development Kit

npm version

Login with PrivyID Button

Step 1: Include Privy SDK

<script src="http://unpkg.com/privy-sdk"></script>

Step 2: Init SDK and place your Merchant Key

Privy.init({
  merchantKey: '< Your Merhant Key>',
})

Step 3: Place this code in wherever you want login button appear in your page

<div class="privy-login-btn" data-width="inline" data-size="medium"></div>

Options

data-size

  • small
  • medium
  • large

data-width

  • inline
  • full

data-color

  • red
  • white

data-style

  • solid
  • outline

data-lang

  • en
  • id

Custom Button

You can create custome login button

<button onclick="loginWithPrivy">
  Login with Privy
</button>
...
...
<script>
  Privy.init({
    merchantKey: '< Your Merhant Key>',
  })

  function loginWithPrivy () {
    Privy.login()
  }
</script>

Development Mode

Add dev: true to change endpoint to development

Privy.init({
  merchantKey: '< Your Merhant Key>',
  dev: true,
})

License

This project is licensed under the MIT License - see the LICENSE file for details

Readme

Keywords

none

Package Sidebar

Install

npm i privy-sdk

Weekly Downloads

299

Version

2.0.3

License

MIT

Unpacked Size

198 kB

Total Files

5

Last publish

Collaborators

  • adenvt
  • privy