简体   繁体   中英

How to Create REST API For Phone Number Authentication in Spring-Boot Project?

I have created some API's for login but am not sure about creating a login with a Username/Phone Number. Can someone help out with any tutorials or any sort of idea on how to create a REST API for phone number authentication on a Spring-Boot Project?.

I also require a suggestion on how to bring the third party login like We log in with a google account on most of the web applications

Hi Ninja please read this example and seraching internet

https://dzone.com/articles/add-login-to-your-spring-boot-app-in-10-mins

From what I've understood in your question you are concerned about security and you would like to implement something like an MFA for your users. Since sending OTP codes is expensive (not really but let's assume you want something free) and requires to access external APIs to send the codes (with its own logic) what I can suggest to you is using something like a TOTP (Google Authenticator or Microsoft Authenticator). Here is a good (and most important WORKING) guide I've followed some time ago: https://medium.com/javarevisited/spring-boot-two-factor-authentication-78e00aa10176

With the right adjustments and improvements (or simplifications in case) the main logic will be perfect for your application of MFA.

For the login using for example google/facebook/SAML SSO and so on I can suggest you check on OAUTH2: https://www.baeldung.com/sso-spring-security-oauth2

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM