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

165 feature user registration after azure login #171

Merged
merged 14 commits into from
Oct 23, 2024

Conversation

kaiyangzheng
Copy link
Collaborator

@kaiyangzheng kaiyangzheng commented Oct 9, 2024

Description

  • Make department names unique, and position names in a department unique
  • Change seed back to my email
  • Create new register route in auth service to register new employees
  • Update department and position service to search by name
  • Update authConfig to query for more values from ms api
  • Call register endpoint in frontend
  • Restore smooth navigation by memoing wrapper
  • Add transition animation to form image card

Motivation and Context

  • We want users to be able to login even if their account is not present in the database

Closes [#152]

How has this been tested?

Logging in user and making sure appropriate database rows are created.

Screenshots (if appropriate):

Types of changes

  • 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)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kaiyangzheng kaiyangzheng linked an issue Oct 9, 2024 that may be closed by this pull request
Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mfa-form-automator ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 21, 2024 11:40pm

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like it might be better to have finding in a separate function that both findOneByName and findOrCreateOneByName use, just so the logic is only in one place.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is easily doable but I think for the sake of keeping the service logic explicit/clear the same query can exist in both functions, it's only a few lines + there's a subtle difference in making the department variable mutable ie let department = in findOrCreateOneByName so that it can be overwritten

Copy link
Contributor

@ahweigl ahweigl left a comment

Choose a reason for hiding this comment

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

LGTM

apps/web/src/context/AuthContext.tsx Show resolved Hide resolved
@kaiyangzheng kaiyangzheng merged commit 34fdcfb into main Oct 23, 2024
7 checks passed
@kaiyangzheng kaiyangzheng deleted the 165-feature-user-registration-after-azure-login branch October 23, 2024 19:10
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.

[FEATURE] User Registration after Azure login
3 participants