Synaptic SkillsSynapticSkills
MarketplaceSkill GraphCriar SkillMCP ServerPlataformaEnterprise
v0.1.0-beta
Voltar ao Marketplace
SecurityAvançadoAuto-Sync

Auth Flow Builder

porTHIAGONOMA·THIAGONOMA· v1.8.0 · atualizado em 2026-04-12T22:48:13.234Z
88
Score

Implementa fluxos de autenticação seguros: OAuth 2.1 com PKCE, JWT com refresh token rotation e MFA. Segue OWASP Authentication Cheat Sheet 2025 e suporta NextAuth, Auth0, Clerk e Keycloak.

authenticationoauth2jwtpkcenextauthsecuritymfa
Linguagens
TypeScriptJavaScriptPython
2.3KStars
287Forks
34.2KUsos
Fork

Documento do Skill

SKILL.mdauth-flow-builder/workflow
Passo-a-passo detalhado do skill, referenciando as fases cognitivas:
1
SENSE — Identificar provider e requirements
Escolher provider baseado no contexto: social login → OAuth 2.1; enterprise → SAML; microservices → JWT
Verificar se PKCE é necessário (obrigatório para public clients em OAuth 2.1)
2
CONTEXTUALIZE — Analisar arquitetura existente
Ler middleware/guards existentes para não duplicar proteções
Identificar estratégia de token storage: cookies httpOnly (recomendado) vs. localStorage
3
RECOMMEND — Implementar com NextAuth.js v5
```typescript
// auth.ts
import NextAuth from "next-auth";
import GitHub from "next-auth/providers/github";
export const { auth, handlers, signIn, signOut } = NextAuth({
providers: [GitHub],
session: { strategy: "jwt" },
callbacks: {
async jwt({ token, account }) {
if (account?.access_token) token.accessToken = account.access_token;
if (Date.now() < (token.exp as number) * 1000) return token;
return refreshAccessToken(token); // rotation
},
async session({ session, token }) {
session.user.role = token.role as string;
return session;
},
},
cookies: {
sessionToken: {
options: { httpOnly: true, sameSite: "strict", secure: true },
},
},
});
```
4
EVALUATE — Validar segurança
```typescript
// Testar fluxo completo
describe('Auth', () => {
it('rejects requests without token', async () => {
const res = await fetch('/api/protected');
expect(res.status).toBe(401);
});
it('rejects expired tokens', async () => {
const res = await fetch('/api/protected', {
headers: { Authorization: `Bearer ${expiredToken}` },
});
expect(res.status).toBe(401);
});
});
```
5
RECOMMEND — Configurar PKCE para OAuth flows
```typescript
// Geração do code_verifier e challenge
const codeVerifier = crypto.randomBytes(64).toString('base64url');
const codeChallenge = crypto.createHash('sha256').update(codeVerifier).digest('base64url');
// Incluir no authorization request: code_challenge + code_challenge_method=S256
```
6
REFLECT — Verificar e documentar
Rodar OWASP ZAP scan no endpoint de login
Documentar fluxo de refresh com diagrama de sequência
Reportar telemetria via mcp-skillschain

Telemetria de Agentes

Execuções
0
total
Taxa de Sucesso
0%
últimos 30d
Latência Média
0.0s
p50
Alucinação
0.0%
detecção
Tokens Entrada
0
avg 0/exec
Tokens Saída
0
avg 0/exec

Uso por Plataforma

Skills Relacionados

Depende deSecurity Scanner
24%
Hebbian Synapse
Composite0.240
w = 0.3·α + 0.5·β + 0.2·γ
89
Compõe com ←Pen Test Assistant
21%
Hebbian Synapse
Composite0.210
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar aAuthenticate Service
15%
Hebbian Synapse
Composite0.150
w = 0.3·α + 0.5·β + 0.2·γ
85
Similar a ←azure-role-selector
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
83
Similar a ←SKILL: Creating Agent Users in Microsoft Entra Agent ID
60%
Hebbian Synapse
Composite0.600
w = 0.3·α + 0.5·β + 0.2·γ
78
Co-executedSecurity Scanner
41%
Hebbian Synapse
Composite0.406
w = 0.3·α + 0.5·β + 0.2·γ
89
Co-executedAuthenticate Service
40%
Hebbian Synapse
Composite0.400
w = 0.3·α + 0.5·β + 0.2·γ
85
Co-executedPen Test Assistant
41%
Hebbian Synapse
Composite0.409
w = 0.3·α + 0.5·β + 0.2·γ
83

Árvore do Skill

Auth Flow Builder
auth-flow-builder
Fases Cognitivas6
1.SENSE: Percepção
2.CONTEXTUALIZE: Contextualização
3.HYPOTHESIZE: Hipótese
4.EVALUATE: Avaliação
5.RECOMMEND: Recomendação
6.REFLECT: Reflexão
Triggers15
build auth flowcriar autenticaçãosetup authenticationimplementar loginOAuth setupoauth2 implementationjwt configurationnextauth setupauth0 integrationclerk setupkeycloak configpkce implementationrefresh token rotationmfa setupautenticação segura

Avaliar este Skill

Score Breakdown

⭐Avaliação Humana0%
🤖Sucesso de Agentes0%
🕐Atualidade100%
🔗Saúde de Dependências100%
🕸️Centralidade no Grafo0%
🛡️Segurança50%
CompositeScore = α·Humano + β·Agente + γ·Recência + δ·Deps + ε·Centralidade + ζ·Segurança

Instalação

$ synaptic mcp download auth-flow-builder
$ synaptic skills detail auth-flow-builder
$ synaptic skills live auth-flow-builder

Links

GitHub Repository