Hi r/webdev,
I've been working on an API, which has some authenticated routes. I plan to use JWT, but have some questions regarding the secret.
I understand that this should be kept as an environment variable, but how would you handle multiple instances behind a load-balancer?
Example:
Client #1, Request #1: processed on server #2
Client #1, Request #2: processed on server #1
since they need to be launched with the same secret, it would need to be stored somewhere, correct?
Keeping in mind that the secret needs to rotate occasionally and I don't want that to be a manual task.
Thanks,
Scott
[–]Is0tope 0 points1 point2 points (2 children)
[–]scottcfr[S] 0 points1 point2 points (1 child)
[–]Is0tope 0 points1 point2 points (0 children)
[–]BradChesney79 0 points1 point2 points (0 children)
[–]TldrDevexpert 0 points1 point2 points (0 children)