'How "strong" auth-token has to be?

Following this tutorial to implement my authentication authorization for my Next.js + Vapor app: https://maxschmitt.me/posts/next-js-http-only-cookie-auth-tokens/

enter image description here

Is it any requirement how "strong" auth-token should be? Can I use the ID of the user for it? Cookie can be edited from browser by user manually, right? If I just use a userId, and someone figure out someone else's id, he can pretend others identity, right? So I guess I have to generate for each login a session id, and from it in backend decode the userId, right?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source