node.js - Correct Passportjs strategy to use (hash vs jwt) -


i have laravel app i'm trying convert nodejs. in original app have api access protected random generated tokens - assigned each user , stored in our db. automatically generate secret token when user first registers use long use our services. (we verify subscription details users using these tokens).

i'm trying replicate same on nodejs i'm bit lost right authentication strategy use, passportjs has json web tokens (jwt) , 'hash'. both seem correct can't figure out difference , appropriate in case.

if hash correct strategy have use jwt generate token , assign each user? haven't understood concept of hashes , token authentications. differences between hashes , token authentication purposes?

i did more research , found out jwt not using or need our app. create sha hashes each user based on personal details , secret key. hash created , used in new application correctly. simpler thought. , wanting learn bit more jwt, medium article lot:

https://medium.com/vandium-software/5-easy-steps-to-understanding-json-web-tokens-jwt-1164c0adfcec


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -