Fix google auth url
This commit is contained in:
parent
1d320f7284
commit
0c33068398
@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
const API_BASE_URL = 'http://localhost:8000'
|
const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000'
|
||||||
|
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
|
|||||||
@ -28,7 +28,8 @@ function GoogleImport({ onImportComplete }) {
|
|||||||
const handleGoogleImport = () => {
|
const handleGoogleImport = () => {
|
||||||
setImporting(true)
|
setImporting(true)
|
||||||
// Redirect to backend OAuth endpoint (owner will be extracted from email)
|
// Redirect to backend OAuth endpoint (owner will be extracted from email)
|
||||||
window.location.href = 'http://localhost:8000/auth/google'
|
const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:8000'
|
||||||
|
window.location.href = `${apiUrl}/auth/google`
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user