How To Generate 2FA Codes With Spring Boot And Google Authenticator

Опубликовано: 27 Апрель 2026
на канале: Alex Gutjahr
17,734
252

Hey, fam! In this tutorial, I'll demo how to generate time-based one-time passwords (TOTP) with Spring Boot so these can be used for 2-factor authentication (2FA). Based on a shared secret, I'll create a QR code that is understood by Google Authenticator and exposed using a RestController, so the codes can be managed with it.

Get the code from here https://axgr.dev/posts/spring-totp/?u...

🍿 Subscribe if you want to see more Spring Boot + Kotlin tutorials!