- oauthserver
acts as the SSO OAuth Server side - oauthclientprofile
acts as the SSO OAuth Client side - loginUI
based on ReactJS+Antd, the generated UI will be used in oauthserver - profileUI
based on ReactJS+Antd, the generated UI will be used in oauthclientprofile
-
oauthserver
in https://github.com/gfso2000/SpringBoot-OAuth2-SSO-ReactJS-Antd/blob/master/oauthserver/src/main/resources/application.properties,
change "spring.mail.username" and "spring.mail.password" to your gmail username/passwordexecute sql in MySQL to create db schema:
https://github.com/gfso2000/SpringBoot-OAuth2-SSO-ReactJS-Antd/blob/master/oauthserver/src/main/resources/mysql_script/sql.txt -
oauthclientprofile
in https://github.com/gfso2000/SpringBoot-OAuth2-SSO-ReactJS-Antd/blob/master/oauthclientprofile/src/main/resources/application.properties,
change "spring.mail.username" and "spring.mail.password" to your gmail username/password -
loginUI
run "yarn start" to start in dev mode
run "npm run build" to build the final html/js/css
copy dist/umi.css to oauthserver\src\main\resources\static\css folder
copy dist/umi.js to oauthserver\src\main\resources\static\js folder
copy dist/index.html to oauthserver\src\main\resources\templates\login.html
modify login.html, change umi.css/umi.js path to "/css/umi.css" and "/js/umi.js" -
profileUI
run "yarn start" to start in dev mode
run "npm run build" to build the final html/js/css
copy dist/umi.css to oauthclientprofile\src\main\resources\static\css folder
copy dist/umi.js to oauthclientprofile\src\main\resources\static\js folder
copy dist/index.html to oauthclientprofile\src\main\resources\templates\profile.html
modify profile.html, change umi.css/umi.js path to "/css/umi.css" and "/js/umi.js" -
start oauthserver
the URL is http://localhost:8080 -
start oauthclientprofile
the URL is http://localhost:8500/profile
-
get mobile login token
POST http://localhost:8080/mobile/login
Content-Type: application/json
BODY:
{
"userId":"[email protected]",
"password":"123456"
}The response is like below:
{
"status": "success",
"errorMessage": null,
"data": {
"token": "d1438254-7865-427a-be00-85affd55f505"
}
} -
simulate QR scan,
in oauthserver console log, get below qrlogin URL:
POST http://localhost:8080/qrLogin/scan?uuid=2f08c44c-84f4-4866-a5df-49bcc0e53131
Content-Type: application/json
BODY:
{
"userId":"[email protected]",
"token":"433e721c-8d3f-498b-b7e0-de0719018f06"
}