You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$mongo = new MongoDB\Client("mongodb://admin:pass@{$mongoHost}:{$mongoPort}");
$storage = new OAuth2\Storage\Mongo($mongo);
However it doesn't seem to be the right class: Fatal error: Uncaught InvalidArgumentException: First argument to OAuth2\Storage\Mongo must be an instance of MongoDB or a configuration array in /var/www/html/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Mongo.php:37 Stack trace: #0 /var/www/html/public/index.php(19): OAuth2\Storage\Mongo->__construct(Object(MongoDB\Client)) #1 {main} thrown in /var/www/html/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Mongo.php on line 37
I'm trying to connect to my mongoDB by doing this (as stated in https://bshaffer.github.io/oauth2-server-php-docs/storage/mongo/):
However it doesn't seem to be the right class:
Fatal error: Uncaught InvalidArgumentException: First argument to OAuth2\Storage\Mongo must be an instance of MongoDB or a configuration array in /var/www/html/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Mongo.php:37 Stack trace: #0 /var/www/html/public/index.php(19): OAuth2\Storage\Mongo->__construct(Object(MongoDB\Client)) #1 {main} thrown in /var/www/html/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Mongo.php on line 37
It seems the library is expecting the old deprecated mongo client class instead of the new recommended driver
The text was updated successfully, but these errors were encountered: