anonUser static method
- String id
sign in as anonymous user
provide random id
to create new user
its not possible to sign in again as this specific user after session token is revoked
Implementation
static Future<ParseUser> anonUser(String id) async {
// ignore: omit_local_variable_types
final Map<String, String> tmpHead = {}
..addAll(_headers)
..['X-Parse-Revocable-Session'] = '1';
var response = await http.post('$_url/parse/users',
headers: tmpHead,
body: jsonEncode({
'authData': {
'anonymous': {'id': id.toLowerCase()}
}
}));
_errorHandler(response);
return ParseUser._fromResponse(response);
}