Skip to content
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

Cloud code returning {"code":209,"message":"invalid session token"} Google Login; #3003

Closed
abhijeet-aressindia opened this issue Nov 3, 2016 · 8 comments

Comments

@abhijeet-aressindia
Copy link

abhijeet-aressindia commented Nov 3, 2016

I have implemented google+ login with Parse.com by the Cloud code with the reference of https://groups.google.com/forum/#!topic/parse-developers/UUvTreGYOrI. Now our Parse app (Parse-server) is migrated to Heroku.
Login and signup with Email and password , with Facebook and with Twitter is working properly.

I have added ParseUser.enableRevocableSessionInBackground(); after the initialization of Parse for session migration (https://parse.com/tutorials/session-migration-tutorial) to migrate users session to revocable session .

With Google+ Signup/Login my app getting crashed, with some server logs i have found that sessionToken getting undefined which is required for ParseUser.becomeInBackground() for registering user.

Edit 1:

Now I have able to register new user without any error and getting session started with r: but login is still is not working for existing and newly created user.

I have already check following ref. but get nothing specific.

  1. Added support for legacy session tokens #1749
  2. Add support for non-revocable sessions #1392
  3. Queries never fail with 'InvalidSessionToken' error when user is logged with legacy session token #1605

My App is already live on both Android and iOS platforms and now i want to migrate legacy sessions to improved revocable session, but now stuck on the undefined response from cloud code.

Expected Results

[sessionToken]

Actual Outcome

[undefined]

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : [2.2.21]
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [Heroku]
  • Database

    • MongoDB version: [3.2.9]
      • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [mLab]

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

[2016-11-03T13:48:13.965095+00:00 app[web.1]: verbose: REQUEST for [GET] /server/classes/_User/GJ2LHh1k6S: {} method=GET, url=/server/classes/_User/GJ2LHh1k6S, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=/, content-type=text/plain, x-request-id=74772963-ec61-445b-bc21-03f881c4fd00, x-forwarded-for=54.87.78.152, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478180893972, total-route-time=0, content-length=217,
2016-11-03T13:48:14.067598+00:00 app[web.1]: verbose: RESPONSE from [GET] /server/classes/_User/GJ2LHh1k6S: {
2016-11-03T13:48:14.067601+00:00 app[web.1]: "response": {
2016-11-03T13:48:14.067602+00:00 app[web.1]: "objectId": "GJ2LHh1k6S",
2016-11-03T13:48:14.067603+00:00 app[web.1]: "username": "U7yt5Rolfb0W1/4HULJOe7JsShs8bAVR",
2016-11-03T13:48:14.067604+00:00 app[web.1]: "email": "kushal.aressindia@gmail.com",
2016-11-03T13:48:14.067604+00:00 app[web.1]: "firstName": "Kushal",
2016-11-03T13:48:14.067605+00:00 app[web.1]: "lastName": "Dixit",
2016-11-03T13:48:14.067606+00:00 app[web.1]: "account_type": "g",
2016-11-03T13:48:14.067606+00:00 app[web.1]: "createdAt": "2016-10-05T11:01:15.284Z",
2016-11-03T13:48:14.067607+00:00 app[web.1]: "updatedAt": "2016-10-05T11:01:15.284Z",
2016-11-03T13:48:14.067608+00:00 app[web.1]: "ACL": {
2016-11-03T13:48:14.067609+00:00 app[web.1]: "": {
2016-11-03T13:48:14.067609+00:00 app[web.1]: "read": true
2016-11-03T13:48:14.067610+00:00 app[web.1]: },
2016-11-03T13:48:14.067610+00:00 app[web.1]: "GJ2LHh1k6S": {
2016-11-03T13:48:14.067611+00:00 app[web.1]: "read": true,
2016-11-03T13:48:14.067612+00:00 app[web.1]: "write": true
2016-11-03T13:48:14.067612+00:00 app[web.1]: }
2016-11-03T13:48:14.067613+00:00 app[web.1]: }
2016-11-03T13:48:14.067614+00:00 app[web.1]: }
2016-11-03T13:48:14.067615+00:00 app[web.1]: } objectId=GJ2LHh1k6S, username=U7yt5Rolfb0W1/4HULJOe7JsShs8bAVR, email=kushal.aressindia@gmail.com, firstName=Kushal, lastName=Dixit, account_type=g, createdAt=2016-10-05T11:01:15.284Z, updatedAt=2016-10-05T11:01:15.284Z, read=true, read=true, write=true
2016-11-03T13:48:14.132654+00:00 app[web.1]: verbose: REQUEST for [PUT] /server/classes/TokenStorage/Egvw7pYR11: {} method=PUT, url=/server/classes/TokenStorage/Egvw7pYR11, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=
/*, content-type=text/plain, x-request-id=35692a8e-cddb-4ad0-bda6-8965f32aadae, x-forwarded-for=54.87.78.152, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478180894118, total-route-time=0, content-length=217,
2016-11-03T13:48:14.528455+00:00 heroku[router]: at=info method=POST path="/server/classes/TokenStorage/Egvw7pYR11" host=espressoft-parse-server.herokuapp.com request_id=35692a8e-cddb-4ad0-bda6-8965f32aadae fwd="54.87.78.152" dyno=web.1 connect=1ms service=408ms status=200 bytes=522
2016-11-03T13:48:14.532305+00:00 heroku[router]: at=info method=POST path="/server/functions/accessGoogleUser" host=espressoft-parse-server.herokuapp.com request_id=b6962a03-325a-4937-9f98-4fdf1b7a3a57 fwd="49.248.139.244" dyno=web.1 connect=1ms service=1149ms status=200 bytes=483
2016-11-03T13:48:14.506716+00:00 app[web.1]: verbose: RESPONSE from [PUT] /server/classes/TokenStorage/Egvw7pYR11: {
2016-11-03T13:48:14.506730+00:00 app[web.1]: "response": {
2016-11-03T13:48:14.506732+00:00 app[web.1]: "updatedAt": "2016-11-03T13:48:14.132Z"
2016-11-03T13:48:14.506732+00:00 app[web.1]: }
2016-11-03T13:48:14.506733+00:00 app[web.1]: } updatedAt=2016-11-03T13:48:14.132Z
2016-11-03T13:48:14.510413+00:00 app[web.1]: Session_Token:undefined
2016-11-03T13:48:14.511265+00:00 app[web.1]: info: Ran cloud function accessGoogleUser for user undefined with:
2016-11-03T13:48:14.511267+00:00 app[web.1]: Input: {"email":"kushal.aressindia@gmail.com","code":"ya29.CjGKAxy9fFeCNYtgI7Gswiug8iIH_rnFTy7RytNtWrsm5rku3CJdyviSiD1AR768Cg31"}
2016-11-03T13:48:14.511268+00:00 app[web.1]: Result: undefined functionName=accessGoogleUser, email=kushal.aressindia@gmail.com, code=ya29.CjGKAxy9fFeCNYtgI7Gswiug8iIH_rnFTy7RytNtWrsm5rku3CJdyviSiD1AR768Cg31, user=undefined
2016-11-03T13:48:14.511886+00:00 app[web.1]: verbose: RESPONSE from [POST] /server/functions/accessGoogleUser: {
2016-11-03T13:48:14.511899+00:00 app[web.1]: "response": {}
2016-11-03T13:48:14.511900+00:00 app[web.1]: } result=undefined]

@abhijeet-aressindia
Copy link
Author

abhijeet-aressindia commented Nov 8, 2016

Now able to register new user

Server Log

verbose: RESPONSE from [PUT] /server/classes/User/1hc7eZ3fo6: {
2016-11-08T07:28:23.419351+00:00 app[web.1]: "response": {
2016-11-08T07:28:23.419353+00:00 app[web.1]: "updatedAt": "2016-11-08T07:28:23.245Z",
2016-11-08T07:28:23.419354+00:00 app[web.1]: "sessionToken": "r:0f63c3776a95dff40beb21bfcbbb59b5"
2016-11-08T07:28:23.419354+00:00 app[web.1]: }
2016-11-08T07:28:23.419355+00:00 app[web.1]: } updatedAt=2016-11-08T07:28:23.245Z, sessionToken=r:0f63c3776a95dff40beb21bfcbbb59b5
2016-11-08T07:28:23.447416+00:00 app[web.1]: verbose: REQUEST for [GET] /server/login: {
2016-11-08T07:28:23.447420+00:00 app[web.1]: "username": "3Q94g2UM84mylhFO34HB2WactuWr1Kcv",
2016-11-08T07:28:23.447420+00:00 app[web.1]: "password": "LsTFOxRGQok9pEwBKqxkjvJlJJRxxKzF"
2016-11-08T07:28:23.447422+00:00 app[web.1]: } method=GET, url=/server/login, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=
/_, content-type=text/plain, x-request-id=df799fa8-1748-487e-aad9-db4cd30eb4e6, x-forwarded-for=54.81.146.153, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478590103448, total-route-time=0, content-length=332, username=3Q94g2UM84mylhFO34HB2WactuWr1Kcv, password=LsTFOxRGQok9pEwBKqxkjvJlJJRxxKzF
2016-11-08T07:28:23.646984+00:00 app[web.1]: verbose: RESPONSE from [GET] /server/login: {
2016-11-08T07:28:23.646987+00:00 app[web.1]: "response": {
2016-11-08T07:28:23.646988+00:00 app[web.1]: "objectId": "1hc7eZ3fo6",
2016-11-08T07:28:23.646989+00:00 app[web.1]: "username": "3Q94g2UM84mylhFO34HB2WactuWr1Kcv",
2016-11-08T07:28:23.646990+00:00 app[web.1]: "email": "aress.dev.01@gmail.com",
2016-11-08T07:28:23.646990+00:00 app[web.1]: "firstName": "Aress",
2016-11-08T07:28:23.646991+00:00 app[web.1]: "lastName": "Test",
2016-11-08T07:28:23.646991+00:00 app[web.1]: "account_type": "g",
2016-11-08T07:28:23.646992+00:00 app[web.1]: "_email_verify_token": "uV9pn2zYDlMFzuxaTWybYAkS7",
2016-11-08T07:28:23.646992+00:00 app[web.1]: "emailVerified": false,
2016-11-08T07:28:23.646993+00:00 app[web.1]: "createdAt": "2016-11-08T07:28:22.356Z",
2016-11-08T07:28:23.646994+00:00 app[web.1]: "updatedAt": "2016-11-08T07:28:23.245Z",
2016-11-08T07:28:23.646994+00:00 app[web.1]: "useMasterKey": true,
2016-11-08T07:28:23.646995+00:00 app[web.1]: "ACL": {
2016-11-08T07:28:23.646996+00:00 app[web.1]: "*": {
2016-11-08T07:28:23.646996+00:00 app[web.1]: "read": true
2016-11-08T07:28:23.646997+00:00 app[web.1]: },
2016-11-08T07:28:23.646997+00:00 app[web.1]: "1hc7eZ3fo6": {
2016-11-08T07:28:23.646998+00:00 app[web.1]: "read": true,
2016-11-08T07:28:23.646998+00:00 app[web.1]: "write": true
2016-11-08T07:28:23.646999+00:00 app[web.1]: }
2016-11-08T07:28:23.646999+00:00 app[web.1]: },
2016-11-08T07:28:23.647000+00:00 app[web.1]: "sessionToken": "r:5d971ed25674efa786f61b6fbacda8eb"
2016-11-08T07:28:23.647000+00:00 app[web.1]: }
2016-11-08T07:28:23.647002+00:00 app[web.1]: } objectId=1hc7eZ3fo6, username=3Q94g2UM84mylhFO34HB2WactuWr1Kcv, email=aress.dev.01@gmail.com, firstName=Aress, lastName=Test, account_type=g, _email_verify_token=uV9pn2zYDlMFzuxaTWybYAkS7, emailVerified=false, createdAt=2016-11-08T07:28:22.356Z, updatedAt=2016-11-08T07:28:23.245Z, useMasterKey=true, read=true, read=true, write=true, sessionToken=r:5d971ed25674efa786f61b6fbacda8eb
2016-11-08T07:28:23.655081+00:00 app[web.1]: r:5d971ed25674efa786f61b6fbacda8eb
2016-11-08T07:28:23.657646+00:00 app[web.1]: info: Ran cloud function accessGoogleUser for user undefined with:
2016-11-08T07:28:23.657648+00:00 app[web.1]: Input: {"email":"aress.dev.01@gmail.com","code":"ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw"}
2016-11-08T07:28:23.657649+00:00 app[web.1]: Result: "r:5d971ed25674efa786f61b6fbacda8eb" functionName=accessGoogleUser, email=aress.dev.01@gmail.com, code=ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw, user=undefined
2016-11-08T07:28:23.658331+00:00 app[web.1]: verbose: RESPONSE from [POST] /server/functions/accessGoogleUser: {
2016-11-08T07:28:23.658333+00:00 app[web.1]: "response": {
2016-11-08T07:28:23.658333+00:00 app[web.1]: "result": "r:5d971ed25674efa786f61b6fbacda8eb"
2016-11-08T07:28:23.658334+00:00 app[web.1]: }
2016-11-08T07:28:23.658335+00:00 app[web.1]: } result=r:5d971ed25674efa786f61b6fbacda8eb
2016-11-08T07:28:23.670808+00:00 heroku[router]: at=info method=POST path="/server/functions/accessGoogleUser" host=espressoft-parse-server.herokuapp.com request_id=9167dc3f-4907-4d24-8254-cccc988c0bf3 fwd="49.248.139.244" dyno=web.1 connect=0ms service=1713ms status=200 bytes=529
2016-11-08T07:28:23.655389+00:00 heroku[router]: at=info method=POST path="/server/login" host=espressoft-parse-server.herokuapp.com request_id=df799fa8-1748-487e-aad9-db4cd30eb4e6 fwd="54.81.146.153" dyno=web.1 connect=1ms service=204ms status=200 bytes=970
2016-11-08T07:28:23.974363+00:00 heroku[router]: at=info method=POST path="/server/functions/getTime" host=espressoft-parse-server.herokuapp.com request_id=1511f2f9-65cd-4128-910b-803d61298785 fwd="49.248.139.244" dyno=web.1 connect=1ms service=12ms status=200 bytes=506

but still not able to login with existing or this newly created user.

@abhijeet-aressindia
Copy link
Author

abhijeet-aressindia commented Nov 8, 2016

This is the Server response while Login:
: verbose: REQUEST for [POST] /server/functions/accessGoogleUser: {
2016-11-08T07:36:04.618870+00:00 app[web.1]: "email": "aress.dev.01@gmail.com",
2016-11-08T07:36:04.618872+00:00 app[web.1]: "code": "ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw"
2016-11-08T07:36:04.618881+00:00 app[web.1]: } method=POST, url=/server/functions/accessGoogleUser, host=espressoft-parse-server.herokuapp.com, connection=close, x-parse-os-version=6.0.1, x-parse-app-build-version=9, x-parse-client-key=, x-parse-client-version=a1.13.0, x-parse-app-display-version=1.2.0, x-parse-installation-id=0287ee85-d763-4db5-8d25-306894cabcc9, user-agent=Parse Android SDK 1.13.0 (com.hp.babyapp/9) API Level 23, x-parse-application-id=j836GbrAG1uquh1GtkhliEau1B0ylheZXW8Zqk4Y, content-type=application/json, accept-encoding=gzip, x-request-id=56dc483d-ff55-4b43-a005-fee0184700cf, x-forwarded-for=49.248.139.244, x-forwarded-proto=https, x-forwarded-port=443, via=1.1 vegur, connect-time=1, x-request-start=1478590564612, total-route-time=0, content-length=115, email=aress.dev.01@gmail.com, code=ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw
2016-11-08T07:36:04.619102+00:00 app[web.1]: G+ req.params : [object Object]
2016-11-08T07:36:04.620541+00:00 app[web.1]: Google Access Token[object Object]
2016-11-08T07:36:04.737160+00:00 app[web.1]: upsertGoogleUser accessToken ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw || googleData [object Object]
2016-11-08T07:36:04.757967+00:00 app[web.1]: verbose: REQUEST for [GET] /server/classes/TokenStorage: {
2016-11-08T07:36:04.757971+00:00 app[web.1]: "where": {
2016-11-08T07:36:04.757972+00:00 app[web.1]: "accountId": "114480623117503118429"
2016-11-08T07:36:04.757973+00:00 app[web.1]: },
2016-11-08T07:36:04.757973+00:00 app[web.1]: "limit": 1
2016-11-08T07:36:04.757977+00:00 app[web.1]: } method=GET, url=/server/classes/TokenStorage, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=/, content-type=text/plain, x-request-id=0d9c7678-87a2-4c31-9ab2-95d08965d525, x-forwarded-for=54.81.146.153, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478590564763, total-route-time=0, content-length=326, accountId=114480623117503118429, limit=1
2016-11-08T07:36:04.863797+00:00 app[web.1]: verbose: RESPONSE from [GET] /server/classes/TokenStorage: {
2016-11-08T07:36:04.863800+00:00 app[web.1]: "response": {
2016-11-08T07:36:04.863801+00:00 app[web.1]: "results": [
2016-11-08T07:36:04.863802+00:00 app[web.1]: {
2016-11-08T07:36:04.863803+00:00 app[web.1]: "objectId": "S59fRKFR6Q",
2016-11-08T07:36:04.863804+00:00 app[web.1]: "user": {
2016-11-08T07:36:04.863804+00:00 app[web.1]: "__type": "Pointer",
2016-11-08T07:36:04.863805+00:00 app[web.1]: "className": "_User",
2016-11-08T07:36:04.863806+00:00 app[web.1]: "objectId": "1hc7eZ3fo6"
2016-11-08T07:36:04.863806+00:00 app[web.1]: },
2016-11-08T07:36:04.863807+00:00 app[web.1]: "accountId": "114480623117503118429",
2016-11-08T07:36:04.863808+00:00 app[web.1]: "access_token": "ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw",
2016-11-08T07:36:04.863809+00:00 app[web.1]: "createdAt": "2016-11-08T07:28:22.763Z",
2016-11-08T07:36:04.863809+00:00 app[web.1]: "updatedAt": "2016-11-08T07:34:17.141Z"
2016-11-08T07:36:04.863810+00:00 app[web.1]: }
2016-11-08T07:36:04.863811+00:00 app[web.1]: ]
2016-11-08T07:36:04.863811+00:00 app[web.1]: }
2016-11-08T07:36:04.863813+00:00 app[web.1]: } results=[objectId=S59fRKFR6Q, __type=Pointer, className=_User, objectId=1hc7eZ3fo6, accountId=114480623117503118429, access_token=ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw, createdAt=2016-11-08T07:28:22.763Z, updatedAt=2016-11-08T07:34:17.141Z]
2016-11-08T07:36:04.876968+00:00 heroku[router]: at=info method=POST path="/server/classes/TokenStorage" host=espressoft-parse-server.herokuapp.com request_id=0d9c7678-87a2-4c31-9ab2-95d08965d525 fwd="54.81.146.153" dyno=web.1 connect=1ms service=110ms status=200 bytes=835
2016-11-08T07:36:04.882527+00:00 app[web.1]: verbose: REQUEST for [GET] /server/classes/User/1hc7eZ3fo6: {} method=GET, url=/server/classes/User/1hc7eZ3fo6, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=/, content-type=text/plain, x-request-id=597cab3d-684f-43a8-b970-ac545fdd23b7, x-forwarded-for=54.81.146.153, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478590564872, total-route-time=0, content-length=270,
2016-11-08T07:36:04.941326+00:00 app[web.1]: verbose: RESPONSE from [GET] /server/classes/_User/1hc7eZ3fo6: {
2016-11-08T07:36:04.941331+00:00 app[web.1]: "response": {
2016-11-08T07:36:04.941332+00:00 app[web.1]: "objectId": "1hc7eZ3fo6",
2016-11-08T07:36:04.941332+00:00 app[web.1]: "username": "3Q94g2UM84mylhFO34HB2WactuWr1Kcv",
2016-11-08T07:36:04.941333+00:00 app[web.1]: "email": "aress.dev.01@gmail.com",
2016-11-08T07:36:04.941334+00:00 app[web.1]: "firstName": "Aress",
2016-11-08T07:36:04.941335+00:00 app[web.1]: "lastName": "",
2016-11-08T07:36:04.941335+00:00 app[web.1]: "account_type": "g",
2016-11-08T07:36:04.941336+00:00 app[web.1]: "email_verify_token": "uV9pn2zYDlMFzuxaTWybYAkS7",
2016-11-08T07:36:04.941336+00:00 app[web.1]: "emailVerified": false,
2016-11-08T07:36:04.941337+00:00 app[web.1]: "createdAt": "2016-11-08T07:28:22.356Z",
2016-11-08T07:36:04.941338+00:00 app[web.1]: "updatedAt": "2016-11-08T07:35:38.389Z",
2016-11-08T07:36:04.941338+00:00 app[web.1]: "useMasterKey": true,
2016-11-08T07:36:04.941339+00:00 app[web.1]: "relationship": "Mother",
2016-11-08T07:36:04.941339+00:00 app[web.1]: "location": "Select...",
2016-11-08T07:36:04.941340+00:00 app[web.1]: "ACL": {
2016-11-08T07:36:04.941341+00:00 app[web.1]: "
": {
2016-11-08T07:36:04.941341+00:00 app[web.1]: "read": true
2016-11-08T07:36:04.941341+00:00 app[web.1]: },
2016-11-08T07:36:04.941342+00:00 app[web.1]: "1hc7eZ3fo6": {
2016-11-08T07:36:04.941343+00:00 app[web.1]: "read": true,
2016-11-08T07:36:04.941343+00:00 app[web.1]: "write": true
2016-11-08T07:36:04.941343+00:00 app[web.1]: }
2016-11-08T07:36:04.941344+00:00 app[web.1]: }
2016-11-08T07:36:04.941344+00:00 app[web.1]: }
2016-11-08T07:36:04.941349+00:00 app[web.1]: } objectId=1hc7eZ3fo6, username=3Q94g2UM84mylhFO34HB2WactuWr1Kcv, email=aress.dev.01@gmail.com, firstName=Aress, lastName=, account_type=g, email_verify_token=uV9pn2zYDlMFzuxaTWybYAkS7, emailVerified=false, createdAt=2016-11-08T07:28:22.356Z, updatedAt=2016-11-08T07:35:38.389Z, useMasterKey=true, relationship=Mother, location=Select..., read=true, read=true, write=true
2016-11-08T07:36:04.997880+00:00 app[web.1]: verbose: REQUEST for [PUT] /server/classes/TokenStorage/S59fRKFR6Q: {} method=PUT, url=/server/classes/TokenStorage/S59fRKFR6Q, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=
/*, content-type=text/plain, x-request-id=46af78df-8196-4eb5-a70f-8fecf60292ca, x-forwarded-for=54.81.146.153, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478590564985, total-route-time=0, content-length=270,
2016-11-08T07:36:05.073222+00:00 app[web.1]: verbose: RESPONSE from [PUT] /server/classes/TokenStorage/S59fRKFR6Q: {
2016-11-08T07:36:05.073225+00:00 app[web.1]: "response": {
2016-11-08T07:36:05.073226+00:00 app[web.1]: "updatedAt": "2016-11-08T07:36:04.998Z"
2016-11-08T07:36:05.073227+00:00 app[web.1]: }
2016-11-08T07:36:05.073227+00:00 app[web.1]: } updatedAt=2016-11-08T07:36:04.998Z
2016-11-08T07:36:05.074142+00:00 heroku[router]: at=info method=POST path="/server/classes/TokenStorage/S59fRKFR6Q" host=espressoft-parse-server.herokuapp.com request_id=46af78df-8196-4eb5-a70f-8fecf60292ca fwd="54.81.146.153" dyno=web.1 connect=1ms service=87ms status=200 bytes=522
2016-11-08T07:36:05.206541+00:00 heroku[router]: at=info method=POST path="/server/classes/_User/1hc7eZ3fo6" host=espressoft-parse-server.herokuapp.com request_id=ad7170e0-1ee4-4ea8-83eb-b9271b24b7d4 fwd="54.81.146.153" dyno=web.1 connect=1ms service=60ms status=400 bytes=535
2016-11-08T07:36:05.196644+00:00 heroku[router]: at=info method=POST path="/server/functions/accessGoogleUser" host=espressoft-parse-server.herokuapp.com request_id=56dc483d-ff55-4b43-a005-fee0184700cf fwd="49.248.139.244" dyno=web.1 connect=1ms service=582ms status=400 bytes=566
2016-11-08T07:36:05.190477+00:00 app[web.1]: error: Failed running cloud function accessGoogleUser for user undefined with:
2016-11-08T07:36:05.190487+00:00 app[web.1]: Input: {"email":"aress.dev.01@gmail.com","code":"ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw"}
2016-11-08T07:36:05.190489+00:00 app[web.1]: Error: {"code":141,"message":"{"code":209,"message":"invalid session token"}"} functionName=accessGoogleUser, code=141, message={"code":209,"message":"invalid session token"}, email=aress.dev.01@gmail.com, code=ya29.Ci-QA-rJgE3ER9O5uewB7cF-Iuu9yMAJ7Im1HJ1Q-WdCjGMejMYjBiqwNvMTIfhPmw, user=undefined
2016-11-08T07:36:05.192037+00:00 app[web.1]: error: Error generating response. ParseError {
2016-11-08T07:36:05.192040+00:00 app[web.1]: code: 141,
2016-11-08T07:36:05.192041+00:00 app[web.1]: message: '{"code":209,"message":"invalid session token"}' } code=141, message={"code":209,"message":"invalid session token"}
2016-11-08T07:36:05.193058+00:00 app[web.1]: [object Object]
2016-11-08T07:36:05.193550+00:00 app[web.1]: [object Object]
2016-11-08T07:36:04.946084+00:00 heroku[router]: at=info method=POST path="/server/classes/_User/1hc7eZ3fo6" host=espressoft-parse-server.herokuapp.com request_id=597cab3d-684f-43a8-b970-ac545fdd23b7 fwd="54.81.146.153" dyno=web.1 connect=1ms service=70ms status=200 bytes=961
2016-11-08T07:39:42.353605+00:00 heroku[router]: at=info method=GET path="/" host=espressoft-parse-server.herokuapp.com request_id=ebcd7f3b-1e6e-472d-9fe7-77b78b4bf2bf fwd="66.102.6.95" dyno=web.1 connect=0ms service=5ms status=200 bytes=254

@abhijeet-aressindia abhijeet-aressindia changed the title Cloud code returning undefined sessionToken for user.getSessionToken(); Cloud code returning {"code":209,"message":"invalid session token"} Google Login; Nov 8, 2016
@flovilmart
Copy link
Contributor

I have implemented google+ login with Parse.com by the Cloud code with the reference of https://groups.google.com/forum/#!topic/parse-developers/UUvTreGYOrI.

You should probably use the 'native' method now.

@huongtran84
Copy link

Hi flovilmart can you tell more about this You should probably use the 'native' method now.

@abhijeet-aressindia
Copy link
Author

abhijeet-aressindia commented Nov 18, 2016

Now i have implemented Google signup/login with OAuth provided by Parse-Server.

@huongtran84
Copy link

which is version of parse-server supported Google signup/login with OAuth ? I see not on Docs

@abhijeet-aressindia
Copy link
Author

I have upgrade server form 2.2.21 to 2.2.24 and it is working fine for me now.

@flovilmart
Copy link
Contributor

It's been supported for a while now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants