79131467

Date: 2024-10-27 20:51:31
Score: 0.5
Natty:
Report link

The method of authentication preferred for your project solely depends on your project's requirements. Both token and cookie based approaches have their own list of pros and cons. Nest.js as a framework gives you the ability to achieve both of these approaches.

Cookie based authentication

Token based authentication

Conclusion

Token based approach results in a more flexible approach, though it requires some manual code to be written from your side.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: RUBESH VISWANATHAN