I want to use google authenticator and totp algorithm for 2fa on my website. I have 2 questions for generating the QR secret.
I planned to use vault to store the secrets to be more secure but my question is there any other way to generate the secret every time instead of storing it in some storage?
I've read in tutorials that I need to use random secret per user and store that secret in DB for otp verification.
My idea was to store a specific secret somewhere safe and generate a hash using that secret per user. For instance, generate the hash using mySecret+userId
Is it a safe way?