Skip to main content
Add a Sign in with In•Process button to your app using email one-time passwords (OTP). The flow has two steps: send a verification code to the artist’s email, then exchange that code for a JWT auth token.

Flow Overview

  1. Artist enters their email and clicks Send Code
  2. Your app calls POST /oauth/code — In•Process emails a 6-digit OTP
  3. Artist enters the code
  4. Your app calls POST /oauth/login — returns a JWT valid for 1 hour
  5. Include the JWT as a Bearer token on subsequent authenticated requests

API Helpers

Create two thin wrappers around the In•Process API endpoints:

React Hook

Encapsulate the two-step flow in a custom hook:

Button Component

Wire the hook into a self-contained sign-in component:

Using the Token

After a successful login the JWT is available from token and the artist’s Privy embedded wallet address is available from socialWallet. Pass the token as a Bearer header on authenticated In•Process API calls. For example, create an API key for the signed-in artist:
The token expires in 1 hour. Store it in memory or sessionStorage and call the full OTP flow again when it expires.

Parameters

POST /oauth/code — Send Code

Response

POST /oauth/login — Login with OTP

Response

Next Steps