Test OAuth with a redirect URI and HTTPS
masterTo test the OAuth flow in Sandbox with a redirect URI, set PLAID_REDIRECT_URI=http://localhost:3000/ in your .env and register this URI in the Plaid Dashboard.
To test OAuth in Production, you must use HTTPS. You can use mkcert to generate local certificates:
- Install
mkcertand generate certificates in thefrontendfolder:cd frontend brew install mkcert mkcert -install mkcert localhost - Update
frontend/vite.config.tsto use the generatedlocalhost.pemandlocalhost-key.pemfiles.
import fs from "fs";
// inside the server config in vite.config.ts:
server: {
port: 3000,
https: {
cert: fs.readFileSync("localhost.pem"),
key: fs.readFileSync("localhost-key.pem"),
},
// ... existing proxy config
}