@@ -114,7 +114,7 @@ export const useAuthStore = create<AuthState>()(
114114 ) ;
115115
116116 try {
117- await client . getCurrentUser ( ) ;
117+ const user = await client . getCurrentUser ( ) ;
118118
119119 set ( {
120120 oauthAccessToken : tokenResponse . access_token ,
@@ -133,7 +133,7 @@ export const useAuthStore = create<AuthState>()(
133133 get ( ) . scheduleTokenRefresh ( ) ;
134134
135135 // Track user login
136- identifyUser ( `project- ${ projectId } ` , {
136+ identifyUser ( user . uuid , {
137137 project_id : projectId . toString ( ) ,
138138 region,
139139 } ) ;
@@ -319,7 +319,7 @@ export const useAuthStore = create<AuthState>()(
319319 ) ;
320320
321321 try {
322- await client . getCurrentUser ( ) ;
322+ const user = await client . getCurrentUser ( ) ;
323323
324324 set ( {
325325 isAuthenticated : true ,
@@ -330,7 +330,7 @@ export const useAuthStore = create<AuthState>()(
330330 get ( ) . scheduleTokenRefresh ( ) ;
331331
332332 // Track user identity on session restoration
333- identifyUser ( `project- ${ projectId } ` , {
333+ identifyUser ( user . uuid , {
334334 project_id : projectId . toString ( ) ,
335335 region : tokens . cloudRegion ,
336336 } ) ;
0 commit comments