Skip to content

Commit

Permalink
auth: Add comments regarding future work
Browse files Browse the repository at this point in the history
  • Loading branch information
kuv2707 committed Jun 23, 2024
1 parent 51faa1c commit f5c258f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/contexts/GameContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const GameProvider = () => {

useEffect(() => {
if (!auth.isLoggedIn()) {
navigate('/login'+location.search);
navigate('/login' + location.search);
toast.open({
message: 'Please login to continue',
color: 'error',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const Login: React.FC = () => {
event.preventDefault();
console.log('Form submitted');
await auth.authenticate(username, password);
//todo: Check query params for a join game link
navigate('/');
};

Expand Down Expand Up @@ -88,6 +89,7 @@ const Login: React.FC = () => {
<div className="font-kavoon flex justify-center items-center my-3">
Don't have an account?{' '}
<Link
// todo: also send the query params to the register page
to="/register"
className=" text-blue-700 "
>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const SignUp: React.FC = () => {
return;
}
await auth.authenticate(username, password, true);
//todo: Check query params for a join game link
navigate('/');
};

Expand Down Expand Up @@ -116,6 +117,7 @@ const SignUp: React.FC = () => {
<div className="font-kavoon flex justify-center items-center my-3">
Already have an account?{' '}
<Link
//todo: also send the query params to the login page
to="/login"
className=" text-blue-700 "
>
Expand Down

0 comments on commit f5c258f

Please sign in to comment.