webdev-manus-oauth

Implements Manus OAuth redirect handling with nonce-based CSRF protection for fullstack web apps.

1|Updated Jul 17, 2026
One-click install
npx skills add https://github.com/waiyanphyo999/telegram-bot-deploy --skill webdev-manus-oauth-waiyanphyo999
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webdev-manus-oauth
Source: https://github.com/waiyanphyo999/telegram-bot-deploy/tree/main/skills/webdev-manus-oauth
Command: npx skills add https://github.com/waiyanphyo999/telegram-bot-deploy --skill webdev-manus-oauth-waiyanphyo999

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Fullstack apps deployed with separate frontend and backend servers cannot reliably determine the frontend origin on the backend, which breaks OAuth redirect URLs, invite links, and magic links. It also prevents OAuth login CSRF and session-fixation attacks caused by unvalidated callback state. ## Core Features & Use Cases - Origin-safe redirect URLs: Always derive callback and invite URLs from window.location.origin passed explicitly from the frontend, never from hardcoded domains or req.host. - CSRF-protected OAuth callback: Bind the OAuth state parameter to a one-time nonce stored in a __Host- cookie, verified before exchanging the authorization code. - Invite and magic link generation: Accept an origin field in tRPC mutations so backend-generated URLs point at the correct deployment. - Use Case: When adding Google-style login to a Manus fullstack app, use this guidance to wire the login button, callback route, and invite emails so redirects work across preview and production domains without session-fixation vulnerabilities. ## Quick Start Ask the AI to implement the Manus OAuth login flow in your fullstack app using window.location.origin for the redirect URI and the nonce cookie state validation from the template.

Frequently Asked Questions about webdev-manus-oauth

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

FAQPage Schema
How do I handle OAuth redirect URLs when frontend and backend are on separate servers?

Pass window.location.origin from the frontend to the backend in every request that needs a redirect URL. The backend cannot reliably infer the frontend origin from req.host, so hardcoding domains or guessing subdomains produces broken callback and invite links.

How do I prevent OAuth login CSRF and session fixation?

Bind the OAuth state parameter to a one-time nonce stored in a __Host- prefixed cookie when starting login. On the callback, compare the nonce from state against the cookie before exchanging the code, and return 403 on any mismatch.

Why does Manus OAuth fail in Safari Private Browsing or Brave?

Manus OAuth requires cookies to maintain session state, so it fails in browsers that block all cookies. This includes Safari Private Browsing, Firefox with strict Enhanced Tracking Protection, Brave with aggressive Shields, and any browser with all cookies blocked.

How do I generate invite or magic link URLs in a tRPC backend?

Add an origin field validated with z.string().url() to the mutation input and have the frontend send window.location.origin. Build the invite URL as `${origin}/path?token=...` so links point at the domain the user actually visited.

Why does my OAuth callback return 403 after login?

A 403 means the state nonce did not match the cookie set at login start. Common causes are minting the nonce on every render instead of only when navigating to the login URL, or a browser context that blocks the Secure cookie.