Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mover fluxo de login para um service #164

Closed
k1nha opened this issue Aug 20, 2024 · 4 comments · Fixed by #189
Closed

Mover fluxo de login para um service #164

k1nha opened this issue Aug 20, 2024 · 4 comments · Fixed by #189
Assignees

Comments

@k1nha
Copy link
Member

k1nha commented Aug 20, 2024

Mover o fluxo de login, hoje está no controller, para um service novo, implementando os testes necessários (controller, service)

login: AsyncRequestHandler = (req, res) => {
    const authorization = req.headers.authorization;

    if (!authorization) {
      return res.status(401).json({ message: 'Unauthorized' });
    }

    const [, token] = authorization.split(' ');

    const payload = jwt.verify(token, 'secret_key') as TokenPayload;

    const url = generateAuthURL({ id: payload.userId });

    return res.json(url);
  };
@LFelipeP
Copy link

LFelipeP commented Sep 3, 2024

Tenho interesse em atuar nessa issue

@juliaam
Copy link
Contributor

juliaam commented Sep 4, 2024

Tenho interesse em atuar nessa issue

Manito, faz um novo comentário digitando
eu quero!!!

somente com esse texto, com os três !!!, assim a task vai ser sua, se puder, entra lá no discord https://discord.gg/FjXw4pf4

@juliaam juliaam removed their assignment Sep 4, 2024
@LFelipeP
Copy link

LFelipeP commented Sep 5, 2024

eu quero!!!

@LFelipeP LFelipeP removed their assignment Sep 5, 2024
@Frompaje Frompaje moved this from In Progress to Todo in Octopost Backend Sep 6, 2024
@DominMFD
Copy link
Contributor

DominMFD commented Sep 9, 2024

eu quero!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants