User Authentication
Last updated
Last updated
All endpoints that require a Patch wallet signature, like to send transactions or sign a message, must go through user authentication. That includes the following endpoints:
There are 2 ways for Apps to authenticate users:
Due to the OAuth agreement and other restrictions, we only have Phone Number auth at this moment, other native auth are coming soon.
Trigger our auth server to send a verification token to a phone number
Our server will send a SMS with 6 digit verification code to the phone number
POST
https://auth.paymagicapi.com/functions/v1/signInWithOTP
Name | Type | Description |
---|---|---|
Verify the code to get JWT token for transation authentication
POST
https://auth.paymagicapi.com/functions/v1/verifyOTP
On Discord, request a client_id
and client_secret
Tell us what type of auth provider you're using and we'll create a custom Lit Action for signing.
Pass the specified data through the auth
parameter on any Wallet API endpoints. During testing, you can leave the auth
parameter blank.
Name | Type | Description |
---|---|---|
Use native Patch auth:
Phone number
Github
Use your own auth:
Use Auth0, Clerk.com, or another service to authenticate users. Then push transactions through their wallets.
You get to choose your provider name like uniswap
, meta
, or yourname
.
phone*
String
US/Canada phone number with +1 area code
phone*
String
US/Canada phone number with +1 area code
token*
String
6 digit code from SMS