auth-guide

Configure third-party API key and OAuth authentication for Notion Workers.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill auth-guide-moneyplug
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: auth-guide
Source: https://github.com/MoneyPlug/money-plug-hub-mobile/tree/main/.agents/skills/auth-guide
Command: npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill auth-guide-moneyplug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up credentials for external services (GitHub, Stripe, Google, etc.) inside a Notion Worker involves choosing between API keys and OAuth, managing secrets, configuring redirect URLs, and debugging auth failures. This guide walks through that entire process with a clear decision framework and step-by-step setup instructions. ## Core Features & Use Cases - Auth Decision Framework: Mechanically choose between personal API keys/PATs and OAuth based on what the provider offers and whether the worker should depend on one person's credential. - API Key Setup: Store tokens in .env, read them via process.env in execute, test with curl, and push secrets to the deployed worker with ntn workers env push. - OAuth Setup: Declare worker.oauth() capabilities, register provider apps, configure redirect URLs, run the authorization flow, and call accessToken() for auto-refreshed tokens. - Use Case: You are building a sync that pulls GitHub issues into Notion. The guide tells you to use a personal access token, add it to .env as GITHUB_API_TOKEN, verify it with curl, then push it remotely before deploying. ## Quick Start Ask the assistant to set up authentication for the external API your Notion Worker integrates with, and it will recommend API key or OAuth and walk you through the setup.

Frequently Asked Questions about auth-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an API key to a Notion Worker?▼

Add the token to a `.env` file (e.g., `GITHUB_API_TOKEN=<token>`), read it inside `execute` via `process.env.GITHUB_API_TOKEN`, then run `ntn workers env push` to send it to the deployed worker. Test locally first with `ntn workers exec <capability> --local`.

How do I set up OAuth for a Notion Worker?▼

Declare a `worker.oauth()` capability with the provider's authorization and token endpoints, register an OAuth app with the provider, push client credentials before deploying, then run `ntn workers oauth start <key>` to complete the flow. Call `accessToken()` inside `execute` for a refreshed token.

Should I use an API key or OAuth for third-party API access?▼

Prefer a personal API key or PAT when the provider offers one, since it is the simplest fit for an individual-scoped worker. Choose OAuth when the service is OAuth-only or when the worker should not depend on one person's credential.

Why does OAuth fail with redirect_uri_mismatch?▼

The redirect URL registered at the provider does not match the worker's actual URL. Run `ntn workers oauth show-redirect-url` and paste that exact value into the provider app's redirect URI setting before starting the OAuth flow.

Can I test OAuth locally with ntn workers exec --local?▼

Yes, but only after deploying once and completing the OAuth flow remotely. Then run `ntn workers env pull` to bring the access token into your local `.env`; re-pull when the token expires since local env does not auto-refresh.

What if a service offers neither API keys nor OAuth?▼

Consider indirect paths: OAuth into a related service that holds the data, manual export and upload of files, parsing the service's emails via Gmail OAuth, or carefully using internal frontend endpoints after confirming terms-of-service compliance.