Skip to content

Commit

Permalink
Minor modifications in google callback URL
Browse files Browse the repository at this point in the history
  • Loading branch information
sikehish committed Jun 10, 2024
1 parent 827809c commit 2a51729
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions frontend/src/pages/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ function Login() {
};


// const googleAuth = (e: any) => {
// e.preventDefault()
// window.open(
// `http://localhost:3000/api/oauth/google/callback`,
// "_self"
// );
// };
// OR
const googleAuth = (e: any) => {
e.preventDefault()
window.open(
`${import.meta.env.VITE_REACT_APP_API_URL}/api/oauth/google/callback`,
`/api/oauth/google/callback`,
"_self"
);
};
// // OR //--> The below is returning undefined in Elastic Beanstalk
// const googleAuth = (e: any) => {
// e.preventDefault()
// window.open(
// `${import.meta.env.VITE_REACT_APP_API_URL}/api/oauth/google/callback`,
// "_self"
// );
// };

// // Old approach: (without NGINX):
// const googleAuth = (e: any) => {
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/pages/auth/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ function Signup() {
const navigate=useNavigate()
const queryClient=useQueryClient()

// const googleAuth = (e: any) => {
// e.preventDefault()
// window.open(
// `http://localhost:3000/api/oauth/google/callback`,
// "_self"
// );
// };
// OR
const googleAuth = (e: any) => {
e.preventDefault()
window.open(
`${import.meta.env.VITE_REACT_APP_API_URL}/api/oauth/google/callback`,
`/api/oauth/google/callback`,
"_self"
);
};
// // OR
// const googleAuth = (e: any) => {
// e.preventDefault()
// window.open(
// `${import.meta.env.VITE_REACT_APP_API_URL}/api/oauth/google/callback`,
// "_self"
// );
// };

const handleSubmitBasicInfo = (e: FormEvent) => {
e.preventDefault();
Expand Down

0 comments on commit 2a51729

Please sign in to comment.