mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
Remove Google OAuth from login/register, enforce email-only authentication
- Remove authType state check from LocalLoginForm (always show registration link) - Update .env.example files to set AUTH_TYPE=LOCAL as default - Clarify Google OAuth credentials are only for Gmail/Calendar connectors - Login and register pages now exclusively use email/password authentication This change completes the removal of Google OAuth for user authentication while preserving OAuth functionality for Google Calendar and Gmail connector integrations.
This commit is contained in:
parent
333bc9fef2
commit
586ab481c2
3 changed files with 18 additions and 25 deletions
|
|
@ -24,12 +24,13 @@ SCHEDULE_CHECKER_INTERVAL=5m
|
|||
SECRET_KEY=SECRET
|
||||
NEXT_FRONTEND_URL=http://localhost:3000
|
||||
|
||||
# Auth
|
||||
AUTH_TYPE=GOOGLE or LOCAL
|
||||
# Auth - Email/Password Authentication
|
||||
AUTH_TYPE=LOCAL
|
||||
REGISTRATION_ENABLED=TRUE or FALSE
|
||||
# For Google Auth Only
|
||||
GOOGLE_OAUTH_CLIENT_ID=924507538m
|
||||
GOOGLE_OAUTH_CLIENT_SECRET=GOCSV
|
||||
|
||||
# Google OAuth Credentials (OPTIONAL - Required only for Gmail and Google Calendar connectors)
|
||||
GOOGLE_OAUTH_CLIENT_ID=your_google_client_id
|
||||
GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret
|
||||
|
||||
# Connector Specific Configs
|
||||
GOOGLE_CALENDAR_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/calendar/connector/callback
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
NEXT_PUBLIC_FASTAPI_BACKEND_URL=http://localhost:8000
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL or GOOGLE
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL
|
||||
NEXT_PUBLIC_ETL_SERVICE=UNSTRUCTURED or LLAMACLOUD or DOCLING
|
||||
# Contact Form Vars - OPTIONAL
|
||||
DATABASE_URL=postgresql://postgres:[YOUR-PASSWORD]@db.sdsf.supabase.co:5432/postgres
|
||||
|
|
@ -24,15 +24,9 @@ export function LocalLoginForm() {
|
|||
title: null,
|
||||
message: null,
|
||||
});
|
||||
const [authType, setAuthType] = useState<string | null>(null);
|
||||
const router = useRouter();
|
||||
const [{ mutateAsync: login, isPending: isLoggingIn }] = useAtom(loginMutationAtom);
|
||||
|
||||
useEffect(() => {
|
||||
// Get the auth type from environment variables
|
||||
setAuthType(process.env.NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE || "GOOGLE");
|
||||
}, []);
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
setError({ title: null, message: null }); // Clear any previous errors
|
||||
|
|
@ -233,7 +227,6 @@ export function LocalLoginForm() {
|
|||
</button>
|
||||
</form>
|
||||
|
||||
{authType === "LOCAL" && (
|
||||
<div className="mt-4 text-center text-sm">
|
||||
<p className="text-gray-600 dark:text-gray-400">
|
||||
{t("dont_have_account")}{" "}
|
||||
|
|
@ -245,7 +238,6 @@ export function LocalLoginForm() {
|
|||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue