kyleu / boilerplay

Using the latest technology in the Scala ecosystem, Boilerplay is a reactive web application built on Play Framework, ScalaJS, Silhouette, Sangria/GraphQL, and PostgreSQL. It provides a good starting point for whatever you want to build.

Home Page:https://kyleu.github.io/boilerplay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New user is created on timestamps requests

intracer opened this issue · comments

commented

SELECT count(1) from users
count
2830

[INFO] 2015-07-31 00:00:00,125 from boilerplay.PlayGlobalSettings in New I/O worker #5
Request from [127.0.0.1]: GET /ping?timestamp=1438290000121

[INFO] 2015-07-31 00:00:00,136 from boilerplay.UserService in boilerplay-akka.actor.default-dispatcher-21
Creating new user [User(98031d7a-ad0c-4db6-a74c-2e4a595a2c37,None,UserPreferences(guest,greyblue),List(),Set(models.user.Role$User$@1e84e0),2015-07-30T21:00:00.136)].

[INFO] 2015-07-31 00:00:00,160 from boilerplay.PlayLoggingFilter in boilerplay-akka.actor.default-dispatcher-29
200 (24ms): GET /ping?timestamp=1438290000121

[INFO] 2015-07-31 00:00:05,129 from boilerplay.PlayGlobalSettings in New I/O worker #5
Request from [127.0.0.1]: GET /ping?timestamp=1438290005122

[INFO] 2015-07-31 00:00:05,130 from boilerplay.UserService in boilerplay-akka.actor.default-dispatcher-8
Creating new user [User(a4555c86-d2d2-454e-a3ec-40adaad9bd6c,None,UserPreferences(guest,greyblue),List(),Set(models.user.Role$User$@1e84e0),2015-07-30T21:00:05.130)].

[INFO] 2015-07-31 00:00:05,151 from boilerplay.PlayLoggingFilter in boilerplay-akka.actor.default-dispatcher-8
200 (21ms): GET /ping?timestamp=1438290005122

[INFO] 2015-07-31 00:00:06,278 from boilerplay.PlayGlobalSettings in New I/O worker #1
Request from [127.0.0.1]: GET /websocket

[INFO] 2015-07-31 00:00:10,125 from boilerplay.PlayGlobalSettings in New I/O worker #5
Request from [127.0.0.1]: GET /ping?timestamp=1438290010122

[INFO] 2015-07-31 00:00:10,126 from boilerplay.UserService in boilerplay-akka.actor.default-dispatcher-29
Creating new user [User(25e94685-a931-4819-a5c9-84a28ac2bc3a,None,UserPreferences(guest,greyblue),List(),Set(models.user.Role$User$@1e84e0),2015-07-30T21:00:10.126)].

[INFO] 2015-07-31 00:00:10,152 from boilerplay.PlayLoggingFilter in boilerplay-akka.actor.default-dispatcher-8
200 (26ms): GET /ping?timestamp=1438290010122

[INFO] 2015-07-31 00:00:15,127 from boilerplay.PlayGlobalSettings in New I/O worker #5
Request from [127.0.0.1]: GET /ping?timestamp=1438290015121

Hah, it's creating a new user for every request. Do you have cookies disabled? I'm starting up a fresh install on a new Windows box, I'll be able to reproduce this soon, I hope.

Are you using IE or Edge? I've spun up a Windows 10 instance, and I've found the issue with MS Edge. Looking at it now. I think it has to do with cookies, the developer tools show an empty cookie.

Yeah, this seems to be IE-specific... maybe the Privacy Policy? Not sure, looking at it now.

commented

No, it does not work in Google Chrome version 44.0.2403.125
But works in Firefox 39.0

Yeah, it works in any Firefox, some Chromes, and no IEs. The set-cookie is the following:

boilerplay_auth=39f7465235ab4becc5c02c90d388335341f8e19f175e2a82f599f8f14c3bfe02893b09ac73c1c98938094e3d8274a8abbfd093f73872efa319929d870738c191ff935bc24caddd50e8ed58bb7e05de2bb4540d1b7f0d550bb4f01f76b857d99d50f4107bdbaba025524e3763a77f8de6909546709fdad7811c6c48debd0aa4a0; Max-Age=31536000; Expires=Sat, 30 Jul 2016 15:50:52 GMT; Path=/; Domain=.localhost; HTTPOnly

I've done some research, and can't figure out why the cookie isn't being set for those browsers. Any ideas?

I've added a P3P policy, and still nothing.

Ok, It's because of localhost. If I change the hosts in application.conf to 127.0.0.1, it works... should have a fix soon.

I've pushed a change that sets the host to "127.0.0.1", instead of "localhost". This works around the issue (access it via http://127.0.0.1:9000), I'll work on a permanent solution tonight.

Resolved by changing the default host from localhost to 127.0.0.1 or a custom domain. I've checked in the change to 127.0.0.1.