Skip to content

Examples ​

ExampleShowsNeeds
DemogetAuthCode() with PKCE against a local mock serverNothing
GitHubgetAuthCode() sign-in and your own token exchangeA GitHub OAuth App
Notion MCPbrowserAuth() with Dynamic Client Registration and fileStoreA Notion account
Linear MCPbrowserAuth() with tool calls, step-up and a keychain storeA Linear workspace

Demo ​

The quickest way to see the flow: a mock authorization server with PKCE, no account or credentials. Approve or deny in the browser; denying shows the neutral error page and reports OAuthCallbackError.

bash
git clone https://github.com/kriasoft/oauth-callback.git
cd oauth-callback && bun install

bun run example:demo                # approve or deny in your browser
bun run example:demo --no-browser   # auto-approve

The GitHub and Notion examples run from the same clone with bun run example:github and bun run example:notion. Source: examples/.