@@ -116,6 +116,7 @@ class AuthService {
116
116
id: _uuid.v4 (), // Generate new ID
117
117
email: email,
118
118
isAnonymous: false , // Email verified user is not anonymous
119
+ isAdmin: false ,
119
120
);
120
121
user = await _userRepository.create (item: user); // Save the new user
121
122
print ('Created new user: ${user .id }' );
@@ -156,6 +157,7 @@ class AuthService {
156
157
id: _uuid.v4 (), // Generate new ID
157
158
isAnonymous: true ,
158
159
email: null , // Anonymous users don't have an email initially
160
+ isAdmin: false ,
159
161
);
160
162
user = await _userRepository.create (item: user);
161
163
print ('Created anonymous user: ${user .id }' );
@@ -214,14 +216,14 @@ class AuthService {
214
216
// Invalidate the token using the AuthTokenService
215
217
await _authTokenService.invalidateToken (token);
216
218
print (
217
- '[AuthService] Token invalidation logic executed for user $userId .' );
219
+ '[AuthService] Token invalidation logic executed for user $userId .' , );
218
220
} on HtHttpException catch (_) {
219
221
// Propagate known exceptions from the token service
220
222
rethrow ;
221
223
} catch (e) {
222
224
// Catch unexpected errors during token invalidation
223
225
print (
224
- '[AuthService] Error during token invalidation for user $userId : $e ' );
226
+ '[AuthService] Error during token invalidation for user $userId : $e ' , );
225
227
throw const OperationFailedException (
226
228
'Failed server-side sign-out: Token invalidation failed.' ,
227
229
);
@@ -332,6 +334,7 @@ class AuthService {
332
334
id: anonymousUser.id, // Preserve original ID
333
335
email: linkedEmail,
334
336
isAnonymous: false , // Now a permanent user
337
+ isAdmin: false ,
335
338
);
336
339
final permanentUser = await _userRepository.update (
337
340
id: updatedUser.id,
0 commit comments