privy-sdk
v2.0.4
Published
PrivyID Software Development Kit
Downloads
1,563
Readme
PRIVY SDK
Privy ID Software Development Kit
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