Spaces:
Running
Running
Ctrl+K
- 1.52 kB initial commit
- 250 Bytes Create a simple web application using Flask and pyotp that demonstrates a two-factor authentication flow. First, build a login page that accepts the static credentials username: user and password: test123. After successful login, the backend should generate a new TOTP secret key using pyotp.random_base32() and display a QR code generated from the provisioning URI so it can be scanned in Google Authenticator or Authy. Once the QR code is scanned, show a page where the user can enter the 6-digit OTP generated by the authenticator app. The backend then verifies the OTP using pyotp.TOTP(secret).verify(otp). If the code is correct, display a success message; otherwise, show an error.
- 2.26 kB Create a simple web application using Flask and pyotp that demonstrates a two-factor authentication flow. First, build a login page that accepts the static credentials username: user and password: test123. After successful login, the backend should generate a new TOTP secret key using pyotp.random_base32() and display a QR code generated from the provisioning URI so it can be scanned in Google Authenticator or Authy. Once the QR code is scanned, show a page where the user can enter the 6-digit OTP generated by the authenticator app. The backend then verifies the OTP using pyotp.TOTP(secret).verify(otp). If the code is correct, display a success message; otherwise, show an error.
- 3.66 kB Create a simple web application using Flask and pyotp that demonstrates a two-factor authentication flow. First, build a login page that accepts the static credentials username: user and password: test123. After successful login, the backend should generate a new TOTP secret key using pyotp.random_base32() and display a QR code generated from the provisioning URI so it can be scanned in Google Authenticator or Authy. Once the QR code is scanned, show a page where the user can enter the 6-digit OTP generated by the authenticator app. The backend then verifies the OTP using pyotp.TOTP(secret).verify(otp). If the code is correct, display a success message; otherwise, show an error.
- 3.71 kB Create a simple web application using Flask and pyotp that demonstrates a two-factor authentication flow. First, build a login page that accepts the static credentials username: user and password: test123. After successful login, the backend should generate a new TOTP secret key using pyotp.random_base32() and display a QR code generated from the provisioning URI so it can be scanned in Google Authenticator or Authy. Once the QR code is scanned, show a page where the user can enter the 6-digit OTP generated by the authenticator app. The backend then verifies the OTP using pyotp.TOTP(secret).verify(otp). If the code is correct, display a success message; otherwise, show an error.
- 388 Bytes initial commit
- 2.18 kB Create a simple web application using Flask and pyotp that demonstrates a two-factor authentication flow. First, build a login page that accepts the static credentials username: user and password: test123. After successful login, the backend should generate a new TOTP secret key using pyotp.random_base32() and display a QR code generated from the provisioning URI so it can be scanned in Google Authenticator or Authy. Once the QR code is scanned, show a page where the user can enter the 6-digit OTP generated by the authenticator app. The backend then verifies the OTP using pyotp.TOTP(secret).verify(otp). If the code is correct, display a success message; otherwise, show an error.