diff --git a/.env b/.env new file mode 100644 index 0000000..0d0092a --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +VITE_AUTH_URL="http://localhost:8080/auth/google" +#VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev/auth/google" \ No newline at end of file diff --git a/src/pages/SignUp.jsx b/src/pages/SignUp.jsx index 4617f1d..123ae6c 100644 --- a/src/pages/SignUp.jsx +++ b/src/pages/SignUp.jsx @@ -1,5 +1,8 @@ import React from "react"; function SignUpForm() { + const authUrl = import.meta.env.VITE_AUTH_URL; + + const [state, setState] = React.useState({ name: "", email: "", @@ -30,7 +33,8 @@ function SignUpForm() { }; const googleAuth = () => { - window.open("https://byte-camp-auth-service.fly.dev/auth/google", "_self"); + + window.open(authUrl, "_self"); }; return (