Cannot authenticate after play reloads
fnordian opened this issue · comments
I try to integrate play2-auth 0.13.2 in my small play 2.3.8 project. Authentication works fine until I change a file in the project and play reloads. After that, all controllers requiring authentication are not accessible anymore. I can see that authentication seems to work as expected until it reaches AsyncAuth.restoreUser, which does not return the user but Future.successful(Option.empty -> identity).
If I restart the application it works again. I tried the ehcache option diskPersitent=true, but it didn't change the behavior.
What can I do to track down the problem?
mmm, It's strange...
Can I ask some question?
- Are there alter Cache API implementation setting in you application.conf like Memcache, Redis ?
- Is EhCache option setting as like this? https://github.com/t2v/play2-auth/wiki/FAQ#q-how-to-keep-logged-in-session-when-code-was-changed-in-dev-mode
- After reload play, Does EhCache diskStore file contains Data?
I'll also try it after returning home.
- There are no other cache-settings in application.conf
- The ehcache-settings are like in the faq
- There are cache files and they contain data before and after reload, the cache is not used for anything else and I've cleared before starting the application
Were you able to find out something about this issue?
Sorry my late reply.
For now I'm bit bussy.
I'll check this problem in next week.
sorry again.
Any luck?
I checked my app with play2-auth 0.13.2 and play 2.3.8.
However the app can keep a session after compile in DEV mode.
my ehcache.conf as follow
<?xml version="1.0" encoding="UTF-8"?>
<ehcache>
<diskStore path="./target"/>
<defaultCache
diskPersistent="true"
maxEntriesLocalHeap="1000"
/>
</ehcache>
Can I take your reproducible project?
I think, I've got a problem with sorm causing an Exception which was not logged and play2-auth recovers it with authenticationFailure. Maybe some logging in case of an Exception would be nice, but it does not seem to be an issue with play2-auth. Thanks for checking.