I'm working on a multi-page app with ExpressJS and I was wondering if I should generate a JWT token when the user registers or when the user logs in.
I thought that generating the token on register would be good but then I saw some examples online generating the token on login.
So, when should I generate the token?