-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I am trying to use the generateSecret function, but I am getting this error whenever it is ran. I am running this on React v17.0.2 and am using node 16.17.0. I have tried doing npm install buffer, and have tried importing Buffer into this file, but the issue still persists.
ReferenceError: Can't find variable: Buffer
generateSecret
node_modules/time2fa/dist/index.mjs:179
176 | };
177 | };
178 | const generateSecret = (secretSize = DEFAULT_TOTP_SECRET_SIZE) => {
> 179 | const bytes = Buffer.from(crypto.randomBytes(secretSize));
180 | return Encode32(bytes);
181 | };
182 | const generateBackupCodes = (numCodes = 10, codeLength = DEFAULT_TOTP_DIGITS) => {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels