Skip to content

mednikoviurii/spring-twofactor-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Two-factor authentication example

This repository contains a source code for the post on 2fa authentication for Spring Webflux APIs.

In this article I will show how to write a two-factor authentication for reactive API, built with Spring Webflux. This app uses TOTP (one-time codes, generated by app on the user device – like Google Authenticator) as the second security factor, alongside with email and password pairs.

Requirements

To run this code, please ensure that your system satisfies following tech requirements:

  • Java 11 +
  • Maven
  • MongoDB (to store data)

How to run this code

  1. Clone this repository
  2. Set Mongodb in application.properties as spring.data.mongodb.uri param
  3. In command line execute spring-boot:run
  4. Access app on http://localhost:8080

License

2020 Yuri Mednikov

This code is provided under MIT license. Use it on your own risk :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages