User Authentication
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:
Use native Patch auth:
Twitter
Email
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
, oryourname
.
Use native Patch auth
Due to the OAuth agreement and other restrictions, we only have Phone Number auth at this moment, other native auth are coming soon.
Phone Number
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
Trigger auth server to send verification token
POST
https://auth.paymagicapi.com/functions/v1/signInWithOTP
Request Body
Name | Type | Description |
---|---|---|
phone* | String | US/Canada phone number with +1 area code |
Verify the code to get JWT token for transation authentication
Verify the code
POST
https://auth.paymagicapi.com/functions/v1/verifyOTP
Request Body
Name | Type | Description |
---|---|---|
phone* | String | US/Canada phone number with +1 area code |
token* | String | 6 digit code from SMS |
Use your own auth
On Discord, request a
client_id
andclient_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 theauth
parameter blank.
Last updated