create-prisma-php-app 5.0.0-alpha.7 → 5.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,7 +117,7 @@ class Auth
117
117
 
118
118
  $jwt = $_COOKIE[self::$cookieName];
119
119
  $verifyToken = $this->verifyToken($jwt);
120
- if ($verifyToken === false) {
120
+ if ($verifyToken === null) {
121
121
  return false;
122
122
  }
123
123
 
@@ -123,11 +123,11 @@ final class AuthMiddleware
123
123
 
124
124
  $verifyToken = $auth->verifyToken($jwt);
125
125
 
126
- if ($verifyToken === false) {
126
+ if ($verifyToken === null) {
127
127
  return false;
128
128
  }
129
129
 
130
- return isset($verifyToken->{Auth::PAYLOAD_NAME});
130
+ return true;
131
131
  }
132
132
 
133
133
  protected static function hasRequiredRole(string $requestPathname): string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "5.0.0-alpha.7",
3
+ "version": "5.0.0-alpha.8",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",