Skip to content

About

jwt auth system with access and refresh tokens using spring boot postgresql and react ts

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

web page one

web page two

🚀 spring-auth-system

🧩 start the project

clone the repo

git clone https://github.com/RaoufGhezal/spring-auth-system
cd spring-auth-system

🐘 create postgresql container

docker run --name spring-auth-db -e POSTGRES_DB=spring_auth_db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres

🔐 create local secrets file

create this file:

/server/src/main/resources/application-local.properties

add your environment variables:

DB_URL=jdbc:postgresql://localhost:5432/spring_auth_db
DB_USERNAME=postgres
DB_PASSWORD=postgres

JWT_SECRET=your-secret-key

⚙️ enable local profile

make sure your application uses the local profile:

spring.profiles.active=local

(you can place this in application.properties)

🌐 frontend config

open client api file:

/client/src/services/api.ts

set backend endpoint:

const baseURL = "http://localhost:8080"

▶️ start client

cd client
npm install
npm run dev

▶️ start server

cd server
./mvnw spring-boot:run

About

jwt auth system with access and refresh tokens using spring boot postgresql and react ts

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages