fix: AWS SES configuration and email verification flow
Changes: - Updated AWS_REGION to eu-central-1 in env examples - Fixed email verification to return new JWT token with updated emailVerified status - Added updateUser function to AuthContext for token refresh - Updated frontend to save new token after email verification - Fixed variable naming conflict (token vs jwtToken) in verification endpoints - Changed WSDC ID placeholder from 26997 to 12345 This ensures the verification banner disappears immediately after email verification without requiring re-login.
This commit is contained in:
@@ -65,12 +65,18 @@ export const AuthProvider = ({ children }) => {
|
||||
setUser(null);
|
||||
};
|
||||
|
||||
const updateUser = (userData) => {
|
||||
setUser(userData);
|
||||
localStorage.setItem('user', JSON.stringify(userData));
|
||||
};
|
||||
|
||||
const value = {
|
||||
user,
|
||||
loading,
|
||||
login,
|
||||
register,
|
||||
logout,
|
||||
updateUser,
|
||||
isAuthenticated: !!user,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user