fis
This commit is contained in:
@@ -13,7 +13,6 @@ interface AuthContextType {
|
||||
signUpWithEmail: (email: string, password: string, displayName?: string) => Promise<void>;
|
||||
sendOTP: (email: string, inviteCode?: string) => Promise<any>;
|
||||
verifyOTP: (email: string, otp: string, inviteCode?: string) => Promise<void>;
|
||||
signInWithOTP: (token: string, userData: any) => Promise<void>;
|
||||
}
|
||||
|
||||
const AuthContext = createContext<AuthContextType | undefined>(undefined);
|
||||
@@ -238,18 +237,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||
return data;
|
||||
};
|
||||
|
||||
const signInWithOTP = async (token: string, userData: any) => {
|
||||
const mockUser = {
|
||||
uid: userData.uid,
|
||||
email: userData.email,
|
||||
displayName: userData.displayName,
|
||||
emailVerified: true
|
||||
} as unknown as User;
|
||||
|
||||
setUser(mockUser);
|
||||
localStorage.setItem('auditly_demo_session', JSON.stringify(mockUser));
|
||||
localStorage.setItem('auditly_auth_token', token);
|
||||
};
|
||||
|
||||
return (
|
||||
<AuthContext.Provider value={{
|
||||
@@ -261,7 +248,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||
signUpWithEmail,
|
||||
sendOTP,
|
||||
verifyOTP,
|
||||
signInWithOTP
|
||||
}}>
|
||||
{children}
|
||||
</AuthContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user