parse-community / docs

Parse Platform docs
https://docs.parseplatform.org
Other
313 stars 518 forks source link

docs: Fix google auth for Parse #940

Closed luca-corteccioni closed 10 months ago

luca-corteccioni commented 10 months ago

In ParseUser.loginWith('google', google( ... , ... , ...) ), the variables of the google() function are placed in incorrect order, which causes error "status code 101, auth is invalid for this user" from parse.

mtrezza commented 10 months ago

Thanks for the PR, do you have a docs reference to verify the order?

luca-corteccioni commented 10 months ago

You can see that in file parse_login_helper.dart of flutter_parse_sdk there is a function that generate the authData to pass:

Map<String, dynamic> google(String token, String id, String idToken) {
  return <String, dynamic>{
    'access_token': token,
    'id': id,
    'id_token': idToken
  };
}