File tree 1 file changed +13
-4
lines changed 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -236,12 +236,10 @@ class ParseUser extends ParseObject implements ParseCloneable {
236
236
Future <ParseResponse > logout ({bool deleteLocalUserData = true }) async {
237
237
final String sessionId = _client.data.sessionId;
238
238
239
- _client.data.sessionId = null ;
240
- ParseCoreData ().setSessionId (null );
239
+ forgetLocalSession ();
241
240
242
241
if (deleteLocalUserData == true ) {
243
- unpin (key: keyParseStoreUser);
244
- _setObjectData (null );
242
+ await this .deleteLocalUserData ();
245
243
}
246
244
247
245
try {
@@ -256,6 +254,17 @@ class ParseUser extends ParseObject implements ParseCloneable {
256
254
}
257
255
}
258
256
257
+ void forgetLocalSession () async {
258
+ _client.data.sessionId = null ;
259
+ ParseCoreData ().setSessionId (null );
260
+ }
261
+
262
+ /// Delete the local user data.
263
+ Future <void > deleteLocalUserData () async {
264
+ await unpin (key: keyParseStoreUser);
265
+ _setObjectData (null );
266
+ }
267
+
259
268
/// Sends a verification email to the users email address
260
269
Future <ParseResponse > verificationEmailRequest () async {
261
270
try {
You can’t perform that action at this time.
0 commit comments