-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Google Oauth breaks - Cannot destructure property clientId
of 'undefined' or 'null'
#6852
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
@mtrezza Its because the validate method is trying to destructure a key called { clientID } from its second parameter, from its definition but it is not set during the invocation. |
Google Auth adapter changed in Parse Server 4.3.0 with #6734, it seems that change broke the adapter. I think we are also missing a test case here for |
Pressed for time as of now. |
That’s because google auth is not set in your auth settings in parse server configuration. |
Oh ok, so the docs was misleading in mentioning that only FB and Twitter auth details are required while initialising Parse |
I am glad to see we could help. If you think there is anything that can be improved in the docs that would have helped you, in addition to what is already discussed in parse-community/docs#754, please feel free to open an issue in the docs repo. I am closing this as it seems to be resolved. Feel free to comment if you have any further questions and we can re-open this issue. |
@mtrezza I have a PR here: parse-community/docs#760 |
Ok, so I am posting this in hope it will re-open this issue. I posted an issues #6856 and was referred back to here. I see that this issue was closed and that it appears help was given to someone, but what is the resolution? I have tried a few things mentioned in here, but I cannot remove that error. Please help!! |
The solution is indicated here: #6852 (comment) and further explained here: #6844 As I understand it, you need to properly configure the Google auth adapter in Parse Server. What is your current configuration? You need to at least set an empty object for the adapter. |
In this doc it does not show a google property: https://parseplatform.org/parse-server/api/master/ParseServerOptions.html So, do I need to add an empty google: {} object where I create my ParseServer? srameshr mentioned to add the empty google object, but I am not sure where it needs to be added? I have tried a few places but no luck. |
@LilMoke For now add it under auth.
|
Awesome, thank you so much, I was not putting the auth: section as soon as I added that it al started working. One last thing. Would you be able to tell me the best way to extend:
I want to add:
Do I need to create my own ParseGoogleUtils, or can this be set somewhere? Again, thanks for the help, it works perfect. |
New Issue Checklist
Issue Description
Google oAuth login fails because of clientId cant be destructured because of a missing param
Steps to reproduce
Actual Outcome
Expected Outcome
Should return a 201 with created resource.
Environment
Server
4.3.0
MacOSX
Localhost
Database
Mongo
4.X
Localhost
Client
CloudCode + JS SDK
1.8
Logs
The text was updated successfully, but these errors were encountered: