Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user page #217

Merged
merged 6 commits into from
Sep 19, 2023
Merged

Add user page #217

merged 6 commits into from
Sep 19, 2023

Conversation

kyudori
Copy link
Contributor

@kyudori kyudori commented Sep 15, 2023

Description

LPVS Front-End User Page. (logout, modify user information)
History, Result, Dashboard pages will be uploaded.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

How Has This Been Tested?

For using social login with Naver, Kakao, and Google, fill the necessary information:

  • Update the application.properties located in src/main/resources:
    Enter client-id and client-secret. (Kakao doesn't require a client-secret.)

  • Update the .env file located in frontend:
    Enter your REST_API_KEY.

The values required to implement the login function can be obtained from the link below.
Naver: https://developers.naver.com/products/login/api/api.md
Kakao: https://developers.kakao.com/docs/latest/ko/kakaologin/common
Google: https://cloud.google.com/identity-platform/docs/web/google

  • frontend
cd frontend
npm install
npm start
  • backend
mvn clean install
cd target
java -jar lpvs-*.jar
  1. Use Chrome to navigate to http://localhost:3000
  2. On the Home Page, click Login in the upper right corner.
  3. You can login to any of the three places you want, Naver, Kakao, and Google.
  4. After logging in, click your name in the upper right corner of the Home Page to go to the User Page.
    (If the name is long, it is abbreviated.)
  5. You can type GitHub ID or Organization by pressing the edit button on the User page.
    user
  6. When the input is complete, click the Admit button to save entered input to the DB.
    (If the Admit function worked normally, output the information about the reflected content as an alert.)
    admit
    (The GitHub ID must be entered; otherwise, a warning alert will be output.)
    duplicate

Test Configuration:

  • Java: v11
  • LPVS Release: v1.1.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

hwan5180 and others added 4 commits September 15, 2023 21:47
Signed-off-by: June Saehwan <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Signed-off-by: June Saehwan <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Signed-off-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Signed-off-by: June Saehwan <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -33,7 +33,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.and()
.logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/oauth/logout"))
.logoutSuccessUrl("/")
.logoutSuccessUrl("http://localhost:3000")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need to move this value to application.properties?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. If we run FE on the server, a hardcoded address could be a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the value to application.properties.
I'd appreciate it if you could check if the name of the newly added variable is okay.

Copy link
Collaborator

@m-rudyk m-rudyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Please change few remarks.

src/main/java/com/lpvs/controller/LPVSWebController.java Outdated Show resolved Hide resolved
src/main/java/com/lpvs/exception/PageControllerAdvice.java Outdated Show resolved Hide resolved
Signed-off-by: jongmin Lee <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Signed-off-by: jongmin Lee <[email protected]>
Co-authored-by: Han Kyuhyun <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@o-kopysov o-kopysov merged commit 554d8f4 into Samsung:main Sep 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants