Merge pull request #11 from whtvrboo/fix/google-oauth-redirect
Fix: Resolve Google OAuth redirection issue
This commit is contained in:
commit
f2609f53ec
@ -113,6 +113,11 @@ Organic Bananas
|
|||||||
AUTH_HEADER_PREFIX: str = "Bearer"
|
AUTH_HEADER_PREFIX: str = "Bearer"
|
||||||
|
|
||||||
# OAuth Settings
|
# OAuth Settings
|
||||||
|
# IMPORTANT: For Google OAuth to work, you MUST set the following environment variables
|
||||||
|
# (e.g., in your .env file):
|
||||||
|
# GOOGLE_CLIENT_ID: Your Google Cloud project's OAuth 2.0 Client ID
|
||||||
|
# GOOGLE_CLIENT_SECRET: Your Google Cloud project's OAuth 2.0 Client Secret
|
||||||
|
# Ensure the GOOGLE_REDIRECT_URI below matches the one configured in your Google Cloud Console.
|
||||||
GOOGLE_CLIENT_ID: str = ""
|
GOOGLE_CLIENT_ID: str = ""
|
||||||
GOOGLE_CLIENT_SECRET: str = ""
|
GOOGLE_CLIENT_SECRET: str = ""
|
||||||
GOOGLE_REDIRECT_URI: str = "http://localhost:8000/auth/google/callback"
|
GOOGLE_REDIRECT_URI: str = "http://localhost:8000/auth/google/callback"
|
||||||
|
@ -30,9 +30,9 @@ VITE_API_URL=https://yourdomain.com/api
|
|||||||
VITE_SENTRY_DSN=your_frontend_sentry_dsn_here
|
VITE_SENTRY_DSN=your_frontend_sentry_dsn_here
|
||||||
VITE_ROUTER_MODE=history
|
VITE_ROUTER_MODE=history
|
||||||
|
|
||||||
# OAuth Configuration (if using)
|
# Google OAuth Configuration - Replace with your actual credentials
|
||||||
GOOGLE_CLIENT_ID=your_google_client_id
|
GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID_HERE"
|
||||||
GOOGLE_CLIENT_SECRET=your_google_client_secret
|
GOOGLE_CLIENT_SECRET="YOUR_GOOGLE_CLIENT_SECRET_HERE"
|
||||||
GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callback
|
GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callback
|
||||||
|
|
||||||
APPLE_CLIENT_ID=your_apple_client_id
|
APPLE_CLIENT_ID=your_apple_client_id
|
||||||
|
@ -35,11 +35,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { API_BASE_URL } from '@/config/api-config';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const handleGoogleLogin = () => {
|
const handleGoogleLogin = () => {
|
||||||
window.location.href = '/auth/google/login';
|
window.location.href = `${API_BASE_URL}/auth/google/login`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAppleLogin = () => {
|
const handleAppleLogin = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user