Expose profile completion in AuthContext
cgen-3436659538b743fca099f634837b1aa6
This commit is contained in:
parent
175c22c348
commit
f5bb409cc2
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import {
|
||||||
aethexUserService,
|
aethexUserService,
|
||||||
aethexRoleService,
|
aethexRoleService,
|
||||||
type AethexUserProfile,
|
type AethexUserProfile,
|
||||||
|
checkProfileComplete,
|
||||||
} from "@/lib/aethex-database-adapter";
|
} from "@/lib/aethex-database-adapter";
|
||||||
|
|
||||||
interface AuthContextType {
|
interface AuthContextType {
|
||||||
|
|
@ -15,6 +16,7 @@ interface AuthContextType {
|
||||||
roles: string[];
|
roles: string[];
|
||||||
session: Session | null;
|
session: Session | null;
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
|
profileComplete: boolean;
|
||||||
signIn: (email: string, password: string) => Promise<void>;
|
signIn: (email: string, password: string) => Promise<void>;
|
||||||
signUp: (
|
signUp: (
|
||||||
email: string,
|
email: string,
|
||||||
|
|
@ -263,6 +265,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
||||||
roles,
|
roles,
|
||||||
session,
|
session,
|
||||||
loading,
|
loading,
|
||||||
|
profileComplete: checkProfileComplete(profile),
|
||||||
signIn,
|
signIn,
|
||||||
signUp,
|
signUp,
|
||||||
signInWithOAuth,
|
signInWithOAuth,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue