parse-community / parse-community/parse-server

for google auth, the access_token is not being recognised. It only recognises id_token?

Open
#7,468 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
Issue Description

I perform the Parse.user's linkWith request
await user.linkWith('google', payload)
where the payload is
const payload = { authData: { id, access_token } }

It fails with id token is invalid for this user error message

From this documentation, it seems access_token is supported for google.
https://docs.parseplatform.org/parse-server/guide/#google-authdata
Also, reading this issue, it seems access_token is supported.
https://github.com/parse-community/parse-server/issues/4698

Yet, when i read the code of the google auth adapter, it seems it only supports id_token. There is no reference to access_token in that file.
https://github.com/parse-community/parse-server/blob/1594afec6421bea31e732dff9b21eb099898bc3a/src/Adapters/Auth/google.js#L64

Was it something that used to be supported but no longer supported?
Am I reading something wrong?

Environment

Server

  • Parse Server version: 4.5.0
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): back4app

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Adapters/Auth/google.js around line 64, then compare its token handling with the Google authData documentation and issue #4698. Determine whether access_token is intended to be supported for linkWith; done means the implementation and documentation consistently reflect the supported token behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.