google app engine - UserService loses loggedInUser? -
I have a client test app and a server app, both are hosted on GAE Client is a simple web front end Server hosts hosted resource protected by OAuth Authentication is done through OpenID and support of applications Federated Login The problem is that after the user logs in, the user forgets who they are (the browser has an ACID cookie, therefore Remember it ).
The flow is here (from the GAE log) ... The user starts by entering cktestclient.appspot.com (Client app) in the browser and pressing the ShowMyCommitments button. After this, the following are visible in the server side logs (ppi.epspot dot com).
9: 10: 22 AM: / Oath / Authorize? Response_type = code and client_id = webappclient and redirect_uri = we are 'logged in so far, so we will be redirected to 9:10:22 AM: / login /? Continue = I login again using url generated byLoginURL
9:10:33 AM: / oauth / authorized? Response_type = Code & amp; Client_id = webappclient and redirect_uri = oyoth dance continues and we see that we have a logged user com.fourspires.api.server.MyGaeAuthenticator authentication: current user (user service) is: richardlandis@gmail.com
9:10:34 am: / oauth / access_token more Oauth dance ... getting oAuthToken, returning to client at cktestclient.appspot.com: / client / showStartPage - which calls on Committee.epspot Continues to do .com: / v3 / commitments
9:10:34 am: / oauth / validating dancing ... oA UthToken is valid which was sent with the request of commitments
9:10: 36am: / v3 / commitments / oauth_token = 9491c Aca6c9ad2b2cb2d20a5cf2773ce22b99e076ff0dcb3a47d06e6a276ff0dcb3a47d06e6a26038d5ccf63c66f1f2387e Now we are back to server code and we check for user - And it's empty!
com.fourspires.api.util.UserHelpers getCurrentUser: UserServiceFactory.getUserService (). GetCurrentUser () = Void
Based on the review of all the threads on this issue, I have the appin-web server. XML really added - but nothing changed.
Do anyone know why user service has lost track of my user? I have an alternative solution for this problem, but I am interested in understanding why it is unsuccessful.
PS - It looks very similar, but it does not seem so.
I believe the answer is because the two of the requests I make are different aproposi , Which have different environments and who are the current users, thus differently understood. I am not sure why I am getting two different APOPROXs, but I can check it further.
Comments
Post a Comment