ng-boot-oauth
June 7, 2026 · View on GitHub

ng-boot-oauth
An oauth2 demo with angularjs and springboot.
Default username is user, and password is password.
1. Features
Modules
The project contains 3 modules
- authserver
- ui (A client using oauth2 code flow)
- ui-spa (A client using oauth2 pkce flow, with a standalone frontend module)
Frontend
- Angular 22
- React 19
- Vue 3
Backend
- Gradle Build Tool
- Spring Boot
- Spring security Oauth2 integration
- Thymeleaf server-side Java template engine
2. RUNNING IN DEVELOPMENT MODE
Note that ui module and ui-spa module can't be running at the same time, because they use the same port 8080.
GET THE CODE
git clone https://github.com/qihaiyan/ng-boot-oauth.git
cd ng-boot-oauth
RUNNING OAuth2 Server
cd authserver
gradle bootRun
RUNNING ui MODULE
cd ui
npm i
npm run dev
gradle bootRun
Now we can visit the app at http://127.0.0.1:8080
RUNNING ui-spa MODULE
- RUNNING BACKEND SERVER
cd ui-spa
./gradlew bootRun
If it's the first time to run ui-spa module, install dependencies at first.
cd ui-spa
npm install
- RUNNING DEV SERVER
cd ui-spa
npm run dev
Now we can visit the app at http://127.0.0.1:4200