Search posts, tags, users, and pages
Mohanish Saim
But how that " process.env.TOKEN_HEADER_KEY " stores token in .env file which is generated by jwt.sign()
Anubhav Goyal
Hi Mohanish, .env file is used to store sensitive information which can't be made public.
To store data in .env file, the format is TOKEN_HEADER_KEY=authtokenheaderkey
and through process.env.TOKEN_HEADER_KEY, we can access header key.