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

feat(login): integrated login form component #47

Merged
merged 32 commits into from
Oct 30, 2023
Merged

Conversation

connordoman
Copy link
Contributor

Signed-off-by: Connor Doman connor@connordoman.dev

A simple username/password login form based on Patternfly.

Example page

To test this functionality, first ensure the .env prerequisites from #33 are met by running this command:

echo "NEXTAUTH_SECRET=$(openssl rand -base64 32)\nNEXTAUTH_URL=http://localhost:3000" > .env.local

Then run (from front-end/):

  1. npm install
  2. npm run dev

You can then navigate to http://localhost:3000/login to test this form. You can use the following credentials:

{
  "username": "johnny@example.com",
  "password": "password"
}

Depends on #33

@connordoman connordoman added feat New feature or request area/front-end Front-end work blocked Do not merge labels Oct 26, 2023
@connordoman connordoman self-assigned this Oct 26, 2023
@tthvo tthvo requested review from linhnnk and removed request for tthvo October 26, 2023 23:04
@tthvo tthvo changed the title feat(interface): integrated login form component feat(login): integrated login form component Oct 27, 2023
@nganphan123
Copy link
Contributor

Screenshot 2023-10-29 200020

I got this error. Was the assets folder committed?

@linhnnk
Copy link
Contributor

linhnnk commented Oct 30, 2023

I did git add --a but somehow that folder is not committed? Do you know how can I fix this problem?

@linhnnk
Copy link
Contributor

linhnnk commented Oct 30, 2023

oh nevermind I got it!

@nganphan123 nganphan123 marked this pull request as ready for review October 30, 2023 04:15
app/front-end/src/components/auth/LoginForm.tsx Outdated Show resolved Hide resolved
app/front-end/src/components/auth/LoginForm.tsx Outdated Show resolved Hide resolved
app/front-end/src/components/auth/LoginForm.tsx Outdated Show resolved Hide resolved
@connordoman
Copy link
Contributor Author

I extracted the header and footer elements Linh created and moved styling around as much as possible. Overriding patternfly base styles is working to some extent but we will have to go back and refactor component structure somewhat.

This PR is rebased on #33 but has also had to refactor aspects of auth due to authorize calling Node modules from the client. We will have to reconsider user.properties.json but that can be sorted out during auth migration. For now, it works as expected and redirects to /video-upload

@connordoman
Copy link
Contributor Author

ping @nganphan123 @linhnnk

@tthvo
Copy link
Contributor

tthvo commented Oct 30, 2023

Rebase on develop pls. You should see your test status here.

Copy link
Contributor

@nganphan123 nganphan123 left a comment

Choose a reason for hiding this comment

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

everything works for me.

.gitignore Outdated Show resolved Hide resolved
@tthvo
Copy link
Contributor

tthvo commented Oct 30, 2023

Hmm, I realized I was mentioning about idea of base64 the password quite vaguely. From a second look, the credentials are sent as JSON, correct? If so, we can leave it as it is then without base64. Otherwise, we will have to encode the entire JSON.

Sorry, would trouble you to revert the latest commit.

@tthvo
Copy link
Contributor

tthvo commented Oct 30, 2023

One more question: Does the login form pops up directly or do I have to click the bottom log in button?

@connordoman
Copy link
Contributor Author

One more question: Does the login form pops up directly or do I have to click the bottom log in button?

gotta click log in

Copy link
Contributor

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

Sounds good! Very nice!

@connordoman connordoman merged commit fb72bdd into develop Oct 30, 2023
4 checks passed
@tthvo tthvo deleted the gh-30-login-ui branch November 30, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/front-end Front-end work feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants