Skip to content

Commit

Permalink
Merge branch '689-authentication' into qa-one
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Schroer committed Jan 8, 2024
2 parents 1d14a2c + d763060 commit 0d77e03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ import OrganizationEditPage from "./pages/OrganizationEditPage";
import { EditBreakingNewsPage } from "./pages/EditBreakingNewsPage";
import { ServiceDiscoveryForm } from "./pages/ServiceDiscoveryForm";
import { ServiceDiscoveryResults } from "./pages/ServiceDiscoveryResults";
import { SignInPage } from "./pages/Auth/SignInPage";
import { LoginPage } from "./pages/Auth/LoginPage";
import { SignUpPage } from "./pages/Auth/SignUpPage";
import { SignOutPage } from "./pages/Auth/SignOutPage";
import { LogoutPage } from "./pages/Auth/LogoutPage";

import styles from "./App.module.scss";

Expand Down Expand Up @@ -222,9 +222,9 @@ export const App = () => {
path="/breaking-news/edit"
component={EditBreakingNewsPage}
/>
<Route exact path="/sign-in" component={SignInPage} />
<Route exact path="/log-in" component={LoginPage} />
<Route exact path="/sign-up" component={SignUpPage} />
<Route exact path="/sign-out" component={SignOutPage} />
<Route exact path="/log-out" component={LogoutPage} />

{/* UCSF white label paths */}
<Route
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { VerificationModal } from "./VerificationModal";

import styles from "./Auth.module.scss";

export const SignInPage = () => {
export const LoginPage = () => {
const [modalIsOpen, setModalIsOpen] = useState(false);
const [email, setEmail] = useState("");
const authClient = useAppContext().authClient as WebAuth;
const { passwordlessStart, passwordlessVerify } = AuthService;

const signIn = (evt: React.SyntheticEvent) => {
const logIn = (evt: React.SyntheticEvent) => {
evt.preventDefault();
passwordlessStart(authClient, email).then(() => {
setModalIsOpen(true);
Expand All @@ -31,7 +31,7 @@ export const SignInPage = () => {
enter in your email address and then check your email to find a 6 digit
verification code.
</p>
<form className={styles.authForm} onSubmit={signIn}>
<form className={styles.authForm} onSubmit={logIn}>
<input
type="text"
name="email"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WebAuth } from "auth0-js";
import { useAppContext, AuthService } from "../../utils";
import Config from "../../config";

export const SignOutPage = () => {
export const LogoutPage = () => {
const context = useAppContext();
const { setAuthState } = context;
const authClient = context.authClient as WebAuth;
Expand Down

0 comments on commit 0d77e03

Please sign in to comment.