PAV-55: Adicionar credentials: include nas chamadas fetch do jobsService#143
Merged
Benevanio merged 4 commits intoJun 17, 2026
Merged
Conversation
…-Community#141) ## Descricao Integra o botao "Entrar com Google" no frontend com o backend OAuth, usando fluxo Full Redirect. **Backend:** - Corrigido callback OAuth para usar `req.session` (compartilhado com middleware `withSession`) em vez de criar instancia separada de `getIronSession` - Callback agora salva `session.userId` e redireciona ao frontend (`res.redirect`) em vez de retornar JSON - Adicionada variavel de ambiente `FRONTEND_URL` para controlar o redirect pos-OAuth **Frontend:** - Adicionada funcao `getGoogleAuthUrl()` no `authService.ts` - Botao Google nas paginas de login e registro agora inicia o fluxo OAuth ao clicar - Criada pagina `AuthCallback` que detecta a sessao e navega para `/app` - Adicionado `refreshUser()` no `AuthContext` para re-buscar `/auth/me` apos redirect OAuth **Testes:** - Atualizados testes unitarios e de integracao do `auth.controller` para esperar redirects (302) em vez de respostas JSON ## Linear link https://linear.app/tatame/issue/PAV-5/login-social-google-oauth ## Como foi testado Testes unitarios e de integracao passando (305/305). Login com Google testado manualmente end-to-end em ambiente local com Docker.
…sService Corrige erro 401 em rotas protegidas para usuarios autenticados, adicionando credentials: "include" em todas as chamadas fetch para que o cookie de sessao (vagas_session) seja enviado nas requests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the Bene Tesla's projects Team on Vercel. A member of the Team first needs to authorize it. |
…: include Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Adiciona
credentials: "include"em todas as chamadasfetch()dojobsService.tspara que o cookie de sessão (vagas_session) seja enviado nas requests. Sem essa opção, todas as rotas protegidas retornavam 401 mesmo com o usuário autenticado. Outros serviços do projeto (comoauthService.tse oAuthContextcom axios) já usavam essa configuração.Linear link
https://linear.app/tatame/issue/PAV-55/adicionar-credentials-include-nas-chamadas-fetch-do-jobsservice
Como foi testado
Backend: 305/305 passando | Frontend: 143/148 (5 falhando — falhas pré-existentes nos testes de
jobsService, não introduzidas por esta mudança)🤖 Generated with Claude Code