forked from cartsnitch/cartsnitch
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 53e802746c |
@@ -95,7 +95,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)
|
CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)
|
||||||
npm install -g @lhci/cli
|
npm install -g @lhci/cli
|
||||||
CHROME_PATH="$CHROME_PATH" lhci autorun --chrome-flags="--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage"
|
LHCI_CHROME_PATH="$CHROME_PATH" lhci autorun
|
||||||
|
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: runners-cartsnitch
|
runs-on: runners-cartsnitch
|
||||||
|
|||||||
+2
-7
@@ -3,12 +3,7 @@
|
|||||||
"collect": {
|
"collect": {
|
||||||
"staticDistDir": "./dist",
|
"staticDistDir": "./dist",
|
||||||
"url": ["http://localhost:4173/"],
|
"url": ["http://localhost:4173/"],
|
||||||
"numberOfRuns": 1,
|
"numberOfRuns": 1
|
||||||
"settings": {
|
|
||||||
"chromeFlags": ["--headless=new", "--no-sandbox", "--disable-gpu", "--disable-dev-shm-usage"],
|
|
||||||
"skipAudits": ["bf-cache"],
|
|
||||||
"disableFullPageScreenshot": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"assert": {
|
"assert": {
|
||||||
"assertions": {
|
"assertions": {
|
||||||
@@ -21,4 +16,4 @@
|
|||||||
"target": "temporary-public-storage"
|
"target": "temporary-public-storage"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-8
@@ -31,14 +31,8 @@ export function Login() {
|
|||||||
throw new Error(authError.message ?? 'Sign in failed')
|
throw new Error(authError.message ?? 'Sign in failed')
|
||||||
}
|
}
|
||||||
|
|
||||||
// After successful signIn, force a session fetch to confirm the cookie is set
|
setAuthenticated(true)
|
||||||
// before navigating to the protected route
|
navigate('/')
|
||||||
const sessionResult = await authClient.getSession()
|
|
||||||
if (sessionResult.data) {
|
|
||||||
navigate('/')
|
|
||||||
} else {
|
|
||||||
setError('Sign in failed. Please try again.')
|
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
if (import.meta.env.VITE_MOCK_AUTH === 'true') {
|
if (import.meta.env.VITE_MOCK_AUTH === 'true') {
|
||||||
setAuthenticated(true)
|
setAuthenticated(true)
|
||||||
|
|||||||
@@ -38,15 +38,8 @@ export function Register() {
|
|||||||
throw new Error(authError.message ?? 'Registration failed')
|
throw new Error(authError.message ?? 'Registration failed')
|
||||||
}
|
}
|
||||||
|
|
||||||
// After successful signUp, force a session fetch to confirm the cookie is set
|
setAuthenticated(true)
|
||||||
// before navigating to the protected route
|
navigate('/')
|
||||||
const sessionResult = await authClient.getSession()
|
|
||||||
if (sessionResult.data) {
|
|
||||||
navigate('/')
|
|
||||||
} else {
|
|
||||||
// Session not established — show success message and link to login
|
|
||||||
setError('Account created! Please sign in.')
|
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
if (import.meta.env.VITE_MOCK_AUTH === 'true') {
|
if (import.meta.env.VITE_MOCK_AUTH === 'true') {
|
||||||
setAuthenticated(true)
|
setAuthenticated(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user