Finally a community Salesforce guide, that works! A minimalist tool for testing and debugging OAuth2 configurations for Salesforce Connected Apps rapidly.
This tool provides an interactive web interface and backend service (running on port 3000) to help you quickly validate OIDC metadata, construct authorization requests with PKCE support 😲, and exchange authorization codes for tokens. The easily extendable, one-page frontend, styled with Tailwind CSS <-- 🏓 communicates bidirectionally 🏓 --> with the backend via WebSocket, making it easy to see responses in real-time while keeping data private.
Key features include:
- fetching OIDC metadata from your connected app’s well-known endpoint
- interactive forms to configure OAuth2 parameters (client ID, secret, callback URL, etc.)
- automatic generation of PKCE code challenges and verifiers
- constructing authorization URLs and handling callback redirects
- debugging token requests with raw JSON responses
Run it locally to streamline your Salesforce OAuth2 connection settings and configuration.
TO RUN LOCALLY :
npm i
npx tsc
node dist/index.js
EXAMPLE USAGE..
1) Enter your *.../.well-known/openid-configuration*
URL to autopopulate available options. Then Click 'Send'.
2. Enter the client_id (Consumer Key) and, if required, the client_secret (Consumer Secret) based on your app configuration, as seen in yellow.
3) Click "Generate PKCE"
4. Click "Construct Request" and follow the link "Authorize with Salesforce" to authenticate and return to the callback URL (this app listens for http://localhost:3000/callback, this must match your Connected App config. See bottom Set-up.)
5. Paste the code and click 'Exchange for Token'.
6. a. Get Result (access || id) token on success.
6. b. Errors are returned as well.
EXAMPLE SETUP
Required Client Secret Location
https://github.com/dchahla/salesforce-connected-app-oauth2-debugger
Open to pull requests, or feature requests. If this helped throw me a star! If you are Salesforce, throw me a job and some stock options!
Cheers!