MCPcopy Create free account
hub / github.com/CodingWithTashi/spring-boot-otp-login

github.com/CodingWithTashi/spring-boot-otp-login @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
41 symbols 86 edges 12 files 0 documented · 0% updated 22mo ago★ 51

Browse by type

Functions 29 Types & classes 12
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

✊ We stand in solidarity with the Tibetan people in their struggle for freedom and cultural preservation. Learn more at Free Tibet.

spring-boot-otp-login

Spring boot OTP based login with Twilio and JWT token

Note

If you've found any of my open-source projects useful,Consider giving them a star ⭐ and following me. It's free for you, but it greatly motivates me to keep contributing more.

Workflow

  1. User enter mobile no
  2. Generate OTP using Twilio
  3. User enter OTP recevied in mobile number
  4. Verify OTP and generate JWT if user otp is valid
  5. User send any request using jwt

Request OTP GET

  • /api/client/auth/requestOtp/{phoneNo}

  • Response ```{ "message": "Otp sent successfully", "status": "success", "otp":"312323" }


## Verify OTP POST
* /api/client/auth/verifyOtp/

* Body

{ "otp":"687619", "phoneNo":"+916361445559" }


* Response

{ "message": "Otp verified successfully", "status": "success", "jwt": "jwt_token_here" }


## Call other api with JWT Token
* /api/client/auth/hello
* Header 

{ "Authorization":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIrOTE2MzYxNDA4NTU5IiwiZXhwIjoxNjYxMTE3MDMzLCJpYXQiOjE2NjEwODEwMzN9._dK8aFLrebA_42rAW3oJfuMhFimiWabioadhC6CRWJ4" } ``` * Response Hello World

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 29
Class 11
Interface 1

Languages

Java100%

Modules by API surface

src/main/java/com/codingwithtashi/springsecurityjwt/util/JwtUtil.java9 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/service/OtpService.java7 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/controller/AuthenticationController.java5 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/config/WebSecurityConfig.java5 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/SpringSecurityJwtApplication.java4 symbols
src/test/java/com/codingwithtashi/springsecurityjwt/SpringSecurityJwtApplicationTests.java2 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/util/JwtRequestFilter.java2 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/service/UserDetailsService.java2 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/repository/UserRepository.java2 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/model/User.java1 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/model/AuthRequest.java1 symbols
src/main/java/com/codingwithtashi/springsecurityjwt/config/TwilioConfig.java1 symbols

For agents

$ claude mcp add spring-boot-otp-login \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page