feat: implement email verification flow and enhance user experience
Deploy Development / deploy (push) Failing after 12s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Failing after 1s
Test Suite / playwright-tests (push) Has been skipped

- Added EmailVerificationBanner component to notify users about unverified email status and provide a resend verification option.
- Introduced VerifyPage for handling email verification via a token in the URL, including success and error handling.
- Updated LoginPage and AccountSettingsPage to allow users to resend verification emails directly from these pages.
- Enhanced API utility with new functions for verifying emails and resending verification requests.
- Updated routing to include the new verification page and improved link structure for verification links.
This commit is contained in:
Lars committed 2026-04-29 11:37:54 +02:00
1 parent c6569abe1a
commit 2646bc776a
10 files changed
+390 -17

No files matched your search

+7 -7
View File
@@ -1,4 +1,4 @@
import { createContext, useContext, useState, useEffect } from 'react'
import { createContext, useContext, useState, useEffect, useCallback } from 'react'
import api from '../utils/api'
const AuthContext = createContext(null)
@@ -7,11 +7,7 @@ export function AuthProvider({ children }) {
const [user, setUser] = useState(null)
const [loading, setLoading] = useState(true)
useEffect(() => {
checkAuth()
}, [])
const checkAuth = async () => {
const checkAuth = useCallback(async () => {
const token = localStorage.getItem('authToken')
if (!token) {
setLoading(false)
@@ -27,7 +23,11 @@ export function AuthProvider({ children }) {
} finally {
setLoading(false)
}
}
}, [])
useEffect(() => {
checkAuth()
}, [checkAuth])
/** Fallback, falls ohne checkAuth gesetzt wird (Legacy / Token-Injektion) */
const login = (payload) => {