Skip to content

Commit ad36b3e

Browse files
committed
fix(auth): provide user in context
- Provide non-nullable User - Simplifies user access
1 parent 37af313 commit ad36b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/middlewares/authentication_middleware.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Middleware requireAuthentication() {
119119
}
120120
// If user exists, proceed to the handler
121121
print('Authentication check passed for user: ${user.id}');
122-
return handler(context);
122+
return handler(context.provide<User>(() => user)); // Provide non-nullable User
123123
};
124124
};
125125
}

0 commit comments

Comments
 (0)