-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
for google auth, the access_token is not being recognised. It only recognises id_token? #7468
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
Comments
Thanks for reporting. Is this related to #6849? |
Hi, My two constraints are:
So there are two paths of progress.
Now i have the
firebase
So there is a few resulting questions:
Thanks. |
I don't know anything about using google signing on the web, but a quick look at the docs it is said:
So I guess the user id is in its profile. But otherwise, it's quite easy to remove the server side check on that id, as we only need to remove these lines:
or at least add a case where the id is undefined. I still have no clue on why #6849 isn't passing the tests, but otherwise I'm happy to include this in the PR |
@SebC99 Look here: It looks like the google adapter is doing the important checks against the JWT for So I also agree that the id is not necessary. Regarding your comment about the tests not passing, I could not see any pull requests against that #6849 . Do you have a link to the test you mention that is failing? |
Seeing the same issue, had old code that passes a google access_token to linkWith in 4.2.0, now on 4.10.3 and the google access_token is not being accepted by linkWith. switching to the id_token works fine. |
Change de Auth data, not to { id, access_token } try with { id, id_token }, works for me!!!! |
The user gets created fine with {id, id_token}, it doesn't with access_token |
I opened the original issue on this 4 years ago :D currently hitting it again, is it not possible to support both id_token and access_token ? |
In light of #9667, please review the updated functionality and docs for the auth adapter. Maybe the issue has been fixed. |
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 messageFrom 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.
#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.
parse-server/src/Adapters/Auth/google.js
Line 64 in 1594afe
Was it something that used to be supported but no longer supported?
Am I reading something wrong?
Environment
Server
4.5.0
back4app
The text was updated successfully, but these errors were encountered: