Skip to content

Google auth is invalid for this user. #4698

Closed
@josephkandi

Description

@josephkandi

We use GitHub Issues for bugs.

If you have a non-bug question, ask on Stack Overflow or Server Fault:

If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md

You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue

--- Please use this template. If you don't use this template, your issue may be closed without comment. ---

Issue Description

Am trying to login with Google. I have used the Google OAuth 2 Playground and got an access token. Am passing the access token in the authData as follows

{ "username": "josephkandi", "authData": { "google": { "id": "[email protected]" "access_token": "token-here" } } }

Steps to reproduce

My app is hosted on Heroku, so i have used the parse-server example, https://github.com/parse-community/parse-server-example.

I have updated my packages.json to the latest as follows :

"dependencies": { "express": "^4.16.3", "kerberos": "0.0.23", "parse": "^1.11.1", "parse-server": "^2.7.4" }

I use Postman and send a POST request to https://my-parse-server-url/parse/users/

Expected Results

Am supposed to get 201 created but instead i get the error :

{ "code": 101, "error": "Google auth is invalid for this user." }

Actual Outcome

What is happening instead.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.7.4
    • Operating System: Heroku
    • Hardware: Heroku
    • Localhost or remote server? heroku
  • Database

    • MongoDB version: mlab, Heroku addon
    • Storage engine: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? Heroku

Logs/Trace

2018-04-04T20:07:18.458649+00:00 app[web.1]: verbose: REQUEST for [POST] /parse/users/: { 2018-04-04T20:07:18.458670+00:00 app[web.1]: "username": "josephkandi", 2018-04-04T20:07:18.458672+00:00 app[web.1]: "authData": { 2018-04-04T20:07:18.458674+00:00 app[web.1]: "google": { 2018-04-04T20:07:18.458676+00:00 app[web.1]: "id": "myemail", 2018-04-04T20:07:18.458679+00:00 app[web.1]: "access_token": "ya29.GluTBbIljEVZ8ZuPfNZg0l8BaoylumMqMmkFLFpZ9msncMvKXWh_h2ofrDQ9I-qj0-CTSQyIWslepBwe1ygB_y0WzatkrnBO0UovdVwbv26iRFtYaf9gkn5omSvu" 2018-04-04T20:07:18.458681+00:00 app[web.1]: } 2018-04-04T20:07:18.458682+00:00 app[web.1]: } 2018-04-04T20:07:18.458685+00:00 app[web.1]: } method=POST, url=/parse/users/, host=parse.peruzal.com, connection=close, accept-encoding=gzip, cf-ipcountry=ZA, x-forwarded-for=41.145.73.111, 172.68.186.57, cf-ray=40666681aa3f8064-CPT, x-forwarded-proto=http, cf-visitor={"scheme":"https"}, x-parse-application-id=my-app-id, content-type=application/json, cache-control=no-cache, postman-token=ab113afa-78c2-4414-962d-ce51d03bddca, user-agent=PostmanRuntime/7.1.1, accept=*/*, cookie=__cfduid=d8327f1e50a2c7db19b3091e5f4b147501522793473, cf-connecting-ip=41.145.73.111, x-request-id=76657b5e-e223-4292-af15-249a8f75fb94, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1522872438434, total-route-time=0, content-length=261, username=josephkandi, id=myemail, access_token=ya29.GluTBbIljEVZ8ZuPfNZg0l8BaoylumMqMmkFLFpZ9msncMvKXWh_h2ofrDQ9I-qj0-CTSQyIWslepBwe1ygB_y0WzatkrnBO0UovdVwbv26iRFtYaf9gkn5omSvu 2018-04-04T20:07:18.569037+00:00 app[web.1]: error: Error generating response. ParseError { code: 101, message: 'Google auth is invalid for this user.' } code=101, message=Google auth is invalid for this user. 2018-04-04T20:07:18.572271+00:00 app[web.1]: error: Google auth is invalid for this user. code=101, message=Google auth is invalid for this user. 2018-04-04T20:07:18.574979+00:00 heroku[router]: at=info method=POST path="/parse/users/" host=parse.peruzal.com request_id=76657b5e-e223-4292-af15-249a8f75fb94 fwd="41.145.73.111,172.68.186.57" dyno=web.1 connect=1ms service=138ms status=404 bytes=591 protocol=http

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions