Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Commit

Permalink
fix(passwords): do not enforce special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Sep 9, 2021
1 parent 1decf6c commit d185570
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions frontend/src/hooks/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ const headers = {

export const tokenRegex = /^[0-9]{6}$/
export const emailRegEx = /.+@.+\..+/
export const passwordRegEx =
/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/
export const passwordRegEx = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$/

export const AuthProvider = ({ children }: PropsWithChildren<unknown>) => {
const [isLoading, setIsLoading] = useState(false)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const emailInput = Type.String({
})

export const passwordInput = Type.String({
pattern: '^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$',
pattern: '^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$',
title: 'Password',
})

Expand Down

0 comments on commit d185570

Please sign in to comment.