-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Securesocial Login not working with Memcache in a play framework setup #486
Comments
Do you see anything on the memcache logs? |
MemCache logs for a login attempt. I do not understand this. Please have a look and comment. 21: going from conn_read to conn_parse_cmd
|
You might want to check if the key length is not over 255 when you use the Memcached. The maximum length of a key in Memcached is 255. If you look into the securesocial.core.authenticator.IdGenerator, the key length can be 256 (= 128 * 2). You need to override IdSizeInByte to be less than 128. |
My current setting is: |
Thoughts, please? |
It seems that some of the keys are expired. Can you verify that the keys are still valid using the memcached console? |
@vishwasg1974 did you verify the keys are valid as @jang1lee suggested? |
I have not verified this yet. Got tied up with few other things. Is there any other way to use secure social in a distributed way? Maybe by storing the state in client side cookies? Please suggest. Thanks and best regards Sent from my iPhone
|
Folks, Is it possible to store the state in a client side cookie so i do not need a distributed cache for SecureSocial to work? |
@vishwasg1974 I think i know what it is, i was having the same problem. Originally when i was using Why this value? Its the maximum value that
Finally, taking into account this limitation with memcached, i would suggest an options to persist the credentials indefinitely or an option to set the expiration date rather than a time value |
I have a working app using SecureSocial login in a play framework setup - works nicely with EHCache in a single server setup. I am trying to distribute this app and was trying to use MemCache. Now Secure social login is not working.
I am pasting 2 debug messages from SecureSocial module 1 after the other. 1st message showing that the user is logged in and the 2nd showing that the user is not logged in.
07-10-2014 19:18:32 - [debug] application - [securesocial] user logged in
07-10-2014 19:18:33 - [debug] application - [securesocial] anonymous user trying to access : /Conversations?pgn=1
This is in a localhost setup and is for the same user. This is strange. Thoughts?
play.plugins config:
1500:com.typesafe.plugin.CommonsMailerPlugin
5000:com.github.mumoshu.play2.memcached.MemcachedPlugin
9994:securesocial.core.DefaultAuthenticatorStore
9995:securesocial.core.DefaultIdGenerator
9996:securesocial.core.providers.utils.DefaultPasswordValidator
9997:controllers.MyViews
9998:service.MyUserService
9999:securesocial.core.providers.utils.BCryptPasswordHasher
10001:securesocial.core.providers.FacebookProvider
10002:securesocial.core.providers.GoogleProvider
application.conf:
ehcacheplugin=disabled
memcached=enabled
memcached.host="127.0.0.1:11211"
The text was updated successfully, but these errors were encountered: