Has_secure_token

Im trying to make a whole authentication In rails from scratch, instead
using devise gem. I used a has_secure_password, but in my app instead
storing session[:user_id] = user.id after successful authentication I
should store user token. I’ve never tried has_secure_token, and I don’t
know if I should store token sent with signup for ever and use it during
every log_in session or I should generate new token after using proper
password? Of course I couldn’t understand everything and it works
tottaly different.