Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gfso2000/SpringBoot-OAuth2-SSO-ReactJS-Antd

Repository files navigation

SpringBoot+OAuth2+SSO+ReactJS+Antd

This repository consists of 4 projects:

  1. oauthserver
    acts as the SSO OAuth Server side
  2. oauthclientprofile
    acts as the SSO OAuth Client side
  3. loginUI
    based on ReactJS+Antd, the generated UI will be used in oauthserver
  4. profileUI
    based on ReactJS+Antd, the generated UI will be used in oauthclientprofile

How to use them:

  1. 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/password

    execute 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

  2. 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

  3. 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"

  4. 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"

  5. start oauthserver
    the URL is http://localhost:8080

  6. start oauthclientprofile
    the URL is http://localhost:8500/profile

How to simulate QR scan login:

  1. get mobile login token
    POST http://localhost:8080/mobile/login
    Content-Type: application/json
    BODY:
    {
    "userId":"jack.yu05@sap.com",
    "password":"123456"
    }

    The response is like below:
    {
    "status": "success",
    "errorMessage": null,
    "data": {
    "token": "d1438254-7865-427a-be00-85affd55f505"
    }
    }

  2. 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":"jack.yu05@sap.com",
    "token":"433e721c-8d3f-498b-b7e0-de0719018f06"
    }

    Screenshots





Releases

No releases published

Packages

Contributors