Skip to content
cccskills
FreePublished on GitHub

oauth-setup

OAuth 2.0 + OIDC para Educabot (Go/TS/React/RN). Authorization Code + PKCE, id_token validation, multi-provider (Google, Microsoft, Apple, GitHub).

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)
Works withGitHub

Run score Not tested

See how to install

Files included (1)

  • SKILL.md3.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

oauth-setup — OAuth 2.0 + OIDC

Flows

FlowUsoEstado
Authorization Code + PKCESPA, mobile, web serverDefault
Authorization Code (client_secret)Backend confidencialOK
Client CredentialsServer-to-server M2MOK
Implicit / Password Grant—Deprecado

Regla: siempre Authorization Code + PKCE, incluso con client_secret (defense in depth).

Providers

ProviderScopes mínimosNotas
Google (default)openid email profilehd claim para dominio escolar. +classroom.rosters.readonly si Classroom
Microsoftopenid email profile User.ReadTenant-specific o common
Applename emailRequerido en iOS si hay otros social logins. ES256, email puede ser relay
GitHubread:user user:emailNo OIDC — parsear /user. Solo staff interno

Librerías

  • Go: golang.org/x/oauth2 + github.com/coreos/go-oidc/v3
  • Node/TS: openid-client (evitar passport-*)
  • React+Vite: @react-oauth/google (solo Google) o flow PKCE manual (multi-provider)
  • Expo: expo-auth-session. Bare RN: react-native-app-auth

PKCE

code_verifier = random 43-128 chars → code_challenge = base64url(sha256(verifier)). Cliente genera verifier, envía challenge en /authorize, envía verifier en /token.

Seguridad Obligatoria

ParámetroPropósitoValidación
stateCSRFRandom opaco, guardar server-side, comparar en callback
nonceReplay protectionIncluir en request, verificar en id_token
code_challenge S256PKCEVer arriba
redirect_uriWhitelist exactoHTTPS siempre (excepto localhost dev)

Validación id_token

Verificar: signature (JWKS), iss exacto, aud = client_id, exp no vencido, nonce match, hd si Workspace.

Sesión Post-OAuth

id_token NO es session token. Crear sesión propia:

  • Web: Cookie httpOnly+Secure+SameSite=Lax, sid → Redis/DB lookup
  • Mobile/SPA: JWT 15min (en memoria) + refresh token httpOnly/secure storage

Nunca localStorage/sessionStorage para tokens.

Account Linking

Verificar email_verified=true → buscar por email → pedir confirmación al usuario → guardar en user_identities(user_id, provider, provider_sub). No auto-linkear sin confirmación.

Multi-tenant (Workspace escolar)

Validar claim hd en id_token server-side. Mapear via schools(domain, tenant_id).

Menores (COPPA/LGPD)

No registro individual de menores. Usar Google Classroom rostering (cuenta Workspace gestionada por escuela). No pedir datos extra sin consentimiento parental.

Anti-patterns

  • Implicit/password grant, SPA sin PKCE, sin state, id_token como session
  • localStorage para tokens, redirect_uri con wildcard, client_secret en frontend
  • Aceptar id_token sin verificar, confiar email sin email_verified, HTTP en redirect_uri prod

Checklist

  • Authorization Code + PKCE (S256)
  • state + nonce generados y validados
  • id_token verificado: signature, iss, aud, exp, nonce
  • email_verified=true antes de trust
  • redirect_uri exacto, HTTPS en prod
  • client_secret solo en backend
  • Sesión propia post-login (httpOnly cookie o JWT+refresh seguro)
  • Tokens NO en localStorage
  • Logout invalida server-side
  • Account linking con confirmación
  • hd validado si Workspace escolar
  • Menores via rostering, no registro individual
  • Logs NO imprimen tokens

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill