zfcampus / zf-mvc-auth

BSD 3-Clause "New" or "Revised" License
42 stars 46 forks source link

always_issue_new_refresh_token is passed to MongoClient, causing MongoConnectionException #98

Open dorongutman opened 9 years ago

dorongutman commented 9 years ago

I've recently updated apigility and I'm now fighting the changes needed.

One of the issues I can't seem to figure out is the following exception:

Fatal error: Uncaught exception 'MongoConnectionException' with message '- Found unknown connection string option 'always_issue_new_refresh_token' with value '1'

It seems like always_issue_new_refresh_token option (and probably others as well) are not being removed from the $options array before passing it to the MongoClient.

The pitfall is in the factory of the server adapter (when creating the mongo client): https://github.com/zfcampus/zf-mvc-auth/blob/master/src/Factory/OAuth2ServerFactory.php#L197

Looking at the equivalent piece of code in https://github.com/zfcampus/zf-oauth2/blob/master/src/Factory/MongoAdapterFactory.php#L57 you can see the options is taken from a sub array "mongo".

I also found the following in the google group: As you can see here: https://groups.google.com/a/zend.com/forum/#!topic/apigility-users/BtCPsO6jS6c

weierophinney commented 4 years ago

This repository has been closed and moved to laminas-api-tools/api-tools-mvc-auth; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-mvc-auth/issues/14.