Code Monkey home page Code Monkey logo

goaliorememberme's People

Contributors

cvele avatar evkoh avatar fgruntjes avatar ojhaujjwal avatar pdobrigkeit avatar prevostc avatar stijnkoopal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goaliorememberme's Issues

zf 2.5.3 and new zend-servicemanager

Deprecated: ServiceManagerAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceManagerAwareInitializer. Please update your class GoalioRememberMe\Authentication\Adapter\Cookie to remove the implementation, and start injecting your dependencies via factory instead. in /vagrant/personal/vendor/zendframework/zend-mvc/src/Service/ServiceManagerConfig.php on line 127

How it correctly to fix?

Doctrine integration

I am wondering how to use this plugin for ZfcUser when Doctrine is used as primary ORM. Is there any progress on this issue?

zfc user 3

This module isn't (yet) compatible with the lastets dev master of zfc-user(3.0)

zfc user 2

There will be a zfcUser 2 release in the near future thats is the same as zfcUser 1 but with support for zf3

MySQL: Can't create table (errno: 150) when running schema.sql

When running the schema.sql
https://github.com/goalio/GoalioRememberMe/blob/master/data/schema.sql
in phpMyAdmin it successfully creates the table user_remember_me but the ALTER command ends with the following error:

MySQL: Can't create table (errno: 150)

According to MySQL doc this means:
If you re-create a table that was dropped, it must have a definition that conforms to the foreign key constraints referencing it. It must have the right column names and types, and it must have indexes on the referenced keys, as stated earlier. If these are not satisfied, MySQL returns error number 1005 and refers to error 150 in the error message.

My table user and its column user_idexists. Is this a privilege problem or a conflict with the ZfcUser structure?

zfcUserLoginWidget miss "Stay logged in" checkbox

Module working fine on /user/login route after install&configure.
In my project that route is excluded, using zfcUserLoginWidget instead on all pages when no user logged in.
Unfortunately the "Stay logged in" checkbox is missing from widget.
Found that user_login_widget_view_template should be changed to use goalio-rememberme/view/zfc-user/user/login.phtml, but not sure how to do this.
Also readed Issue #7, but did not help too much.

Cookie auth storage needs to be cleared on logout

Issue:

  • user signs in
  • session expires (or is deleted) thus uses goalio cookie login
  • now logout then register a new user through zfcuser-register UI
  • cookie auth logs you back in as the original user (not the new user) since it still has that in storage.

To fix:
Add to Adapter/Cookie.php:

public function logout() {
   //...
   $this->getStorage() and $this->getStorage()->clear();
}

There hasn't been maintenance on this package for quite a while. I'll take admin access, or I may end up forking this into a new packagist package to maintain myself.

PDO exception thrown when using sqlite

It happens on login with checkbox checked:

Here's the error:

[Thu Jun 27 11:49:58 2013] [error] [client 10.200.201.99] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 near "&": syntax error' in /var/www/project/revisions/rev1/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Statement.php:187\nStack trace:\n#0 /var/www/project/revisions/rev1/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Statement.php(187): PDO->prepare('UPDATE "user_re...')\n#1 /var/www/project/revisions/rev1/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Statement.php(213): Zend\\Db\\Adapter\\Driver\\Pdo\\Statement->prepare()\n#2 /var/www/project/revisions/rev1/vendor/zf-commons/zfc-base/src/ZfcBase/Mapper/AbstractDbMapper.php(165): Zend\\Db\\Adapter\\Driver\\Pdo\\Statement->execute()\n#3 /var/www/project/revisions/rev1/vendor/goalio/goalio-rememberme/src/GoalioRememberMe/Mapper/RememberMe.php(35): ZfcBase\\Mapper\\AbstractDbMapper->update(Object(GoalioRememberMe\\Entity\\RememberMe), 'user_id = 1 && ...', 'user_remember_m...', Object(GoalioRememberMe\\Mapper\\RememberMeHydr in /var/www/project/revisions/rev1/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Statement.php on line 187

login widget

Hi, could you do that work like zfcUser login widget (zfcUserLoginWidget()) or how could i use login form on my homepage (application/index)?

Cookies not set or deleted by the browser leads to orphans in database

Hi All,

In some occasions the cookie is not set on the client browser (e.g : on chrome when the domain doesn't have a tld part - leaving the domain empty solves the issue), in some other occasions the cookie is deleted by the browser itself (expired cookie / browsing data set to be cleared on browser exit... ).

In such situations, the matching object in the db will never be deleted, leaving soon, a lot of orphans in the rememberme table (which will keep growing overtime...)

I think you should add the expiration date of the cookie to the RememberMe entity. Then, it would be easy to have a cron job or a db function running everyday to remove the expired rows.

My 2 cents :-)

PS1 : btw, for consistency reasons and to avoid issues linked to domain, I think the removeCookie function of the rememberme service should be modified from :

setcookie("remember_me", "", time() - 3600, '/');

to

setcookie("remember_me", "", time() - 3600, '/', $cookieDomain, null, true);

PS2 : What's the purpose of requesting the remember entity from the mapper in RememberMeService::updateSerie ? There is no modification of the object between when we request it in CookieAdapter::authenticate and when we pass it as a parameter of the updateSerie function. Am I missing something or is it a useless call to the db?

Cookie not removed

Hi,

I found another bug: the cookie is not removed well.
This comes from tha fact that the path is not defined when calling the function setCookie() in the method removeCookie() of the RememberMe service (l.70).

It is:
setcookie("remember_me", "", time() - 3600);

It should be:
setcookie("remember_me", "", time() - 3600, '/');

This feature was definitely not tested...

Cheers

Module doesn't work with ZF 2.4.1

After updating ZF to 2.4.1 this module stop working. The problem caused by new cookie value check (till now it must be RFC 7230 compatible). Module genereates cookie value with \n symbol and it raises exception on application start. To solve this problem symbol \n must be replaced with something else (like ::: or |||)

Does this module removes data associated with cookies when user changes his password?

I could not find if this module removes all the data associated with cookies when user changes his password. I guess you should listen to the event, 'changePassword' and remove all the data associated with the user from table, user_remember_me. Optionally, you can add a check box in the changepassword form if all the cookie data are to be removed.

Wrong condition before trying autologin

Hi,

I believe the condition in Module.php l.73 is wrong:
if(isset($cookie['remember_me']) && $cookieLogin == false)

When the user login normally with the form (and check 'Stay logged in'), it first creates a new cookie + serie, and then, on the next page load (on the page redirection after login), the condition is passed and the serie is updated. The condition should not be passed once the user is logged in. The update is useless and should not be done at that moment.

To avoid this and correct this bug, I propose the following condition:
if(isset($cookie['remember_me']) && !$userIsLoggedIn)

With that condition, the autologin will be tried only if the user is not already connected. It is easy to know if the user is logged in or not by calling:
$userIsLoggedIn = $e->getApplication()->getServiceManager()->get('zfcuser_auth_service')->hasIdentity();

Cheers

Unable to "composer install"

Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for zf-commons/zfc-base dev-master -> satisfiable by zf-commons/zfc-base[dev-master].
- zf-commons/zfc-user dev-master requires zf-commons/zfc-base 0.* -> satisfiable by zf-commons/zfc-base[0.0.1, 0.1.0, 0.1.1, v0.1.2].
- Can only install one of: zf-commons/zfc-base[dev-master, 0.0.1].
- Can only install one of: zf-commons/zfc-base[dev-master, 0.1.0].
- Can only install one of: zf-commons/zfc-base[dev-master, 0.1.1].
- Can only install one of: zf-commons/zfc-base[v0.1.2, dev-master].
- Installation request for zf-commons/zfc-user dev-master -> satisfiable by zf-commons/zfc-user[dev-master].

Getting started issue

Hi, I tried setting up your module on a basic skeleton application with ZfcBase, ZfcUser, and GoalioRememberMe loaded...I have my database.local.php file in the autoload directory, as well as your goaliorememberme.global.php file. When I go to user/login, I get your form with the "Stay logged in" check box. When I login with an existing user account however, it returns "Authentication failed. Please try again." When I go into your global config and disable your zfcuser auth_adapter line, I can login fine, but obviously your adapter isnt being used and the cookie isnt being persisted. Any guidance on what I'm doing wrong in this basic setup? Thanks for any help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.