parse-community / parse-community/parse-server
for google auth, the access_token is not being recognised. It only recognises id_token?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- [x ] I am not disclosing a vulnerability.
- [x ] I am not just asking a question.
- [x ] I have searched through existing issues.
- [ x] I can reproduce the issue with the latest version of Parse Server.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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