-
-
Notifications
You must be signed in to change notification settings - Fork 206
Does logout delete all the local user data? #83
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
I'm not 100% certain but I do think that logging a user out would clear the
database in all other Parse SDK's?
I might need to check that.
…On Mon, 18 Feb 2019 at 16:27, Rick Spencer ***@***.***> wrote:
I am using user.logout(). what I think is happening:
1. Session data gets deleted from the Parse server.
2. All of the local user data gets deleted from the shared preferences.
#1 <#1> is
expected, but #2
<#2> is not. Is
it possible that logout() could leave the user data in place so that I can
easily log the user back in again?
Perhaps I am not understanding what is happening correctly? I am testing
on an android emulator.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#83>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3kRc4cMqWXylbn4I37ywa3ziR0s7ks5vOtRZgaJpZM4bBONw>
.
--
Kind Regards
Phill Wiggins
[email protected]
|
Ok, I think I was wrong. I think logout() only deletes the local data and does affect the server at all. That's what the implementation implies. |
btw, here's the code in the branch in which I working: |
So is the SDK correct in logic? Can this be closed?
Thanks
…On Mon, 18 Feb 2019 at 16:31, Rick Spencer ***@***.***> wrote:
btw, here's the code in the branch in which I working:
https://github.com/rapido-mobile/rapido-flutter/blob/parse-login/lib/src/user_page.dart
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3hRzc0jKYOXjn4OSmj1ArefQQ-Mpks5vOtVxgaJpZM4bBONw>
.
--
Kind Regards
Phill Wiggins
[email protected]
|
I don't know if this is by design or not. What I would expect is that the user is logged out on the server, and not deleted on the client. It looks like it is not logged out on the server and is deleted on the client. Am I understanding it correctly? |
What do you mean logged out on the server? Do you mean deleted? The server
database data never changes on logout, but the client data is deleted.
I'm lost sorry.
…On Mon, 18 Feb 2019 at 17:50, Rick Spencer ***@***.***> wrote:
I don't know if this is by design or not. What I would expect is that the
user is logged out on the server, and not deleted on the client. It looks
like it is not logged out on the server and is deleted on the client. Am I
understanding it correctly?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3lFQKYbUG1OoH_o_yq0jD68QRn22ks5vOufbgaJpZM4bBONw>
.
--
Kind Regards
Phill Wiggins
[email protected]
|
Sorry for the confusion. When calling "logout" I would expect:
What I think is happening (again, I could be confused) is that logout simply deletes all of the user data from the shared preferences on the device. So, I think there are 3 states:
Thanks for your patience. |
I see.
Correct. We do not delete any session tokens on the server at this time. Is
that correct logic?
…On Mon, Feb 18, 2019, 18:04 Rick Spencer ***@***.*** wrote:
Sorry for the confusion. When calling "logout" I would expect:
1. To tell the server to delete the current session token.
2. Delete the session token from the shared preferences on the devices.
3. Leave the user information other than the session token (which was
deleted) stored on the device's shared preference so that it is easier to
login in again (i.e. autofill at least the user name).
What I *think* is happening (again, I could be confused) is that logout
simply deletes all of the user data from the shared preferences on the
device.
So, I think there are 3 states:
1. no user is in shared preference
2. a user in shared preferences (username, password, email, etc...)
but is not logged in (there is no session token).
3. a user in shared preferences that is logged in (there is a session
token).
Thanks for your patience.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3pgp2mbj5pctUTgn0AwRc369KW1cks5vOusbgaJpZM4bBONw>
.
|
If it were me, I would have ParseUser.logout call the parse logout endpoint |
I agree with calling the end point to delete tokens but I would also fully
delete everything client side too. That would be more logical. I'm not sure
I've encountered any apps that keep data stored after logout.
…On Mon, Feb 18, 2019, 21:27 Rick Spencer ***@***.*** wrote:
If it were me, I would have ParseUser.logout call the [parse logout
endpoint
]](https://docs.parseplatform.org/rest/guide/#deleting-sessions) and then
delete session token locally as well. I would leave the rest of the user
data in place so it is easy to log back into the server again.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3pZQASO3Qp_9DKhoEjdGdHOSxDI8ks5vOxq9gaJpZM4bBONw>
.
|
Sounds good. Thanks. |
If it's something urgent, do you want to give it a go?
I'm pretty tied up at the moment.
…On Tue, 19 Feb 2019 at 13:20, Rick Spencer ***@***.***> wrote:
Sounds good. Thanks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3utraqXb_ehNHBHqNcDVx6rol-ohks5vO_odgaJpZM4bBONw>
.
--
Kind Regards
Phill Wiggins
[email protected]
|
I'll give it a go. I may have some questions based on when I tried last night. |
This is not correctly resolved, please reopen the issue. |
Wow, this went way faster than I hoped. Thanks to @chrbayer for fixing my pull request so fast. |
I am using user.logout(). what I think is happening:
#1 is expected, but #2 is not. Is it possible that logout() could leave the user data in place so that I can easily log the user back in again?
Perhaps I am not understanding what is happening correctly? I am testing on an android emulator.
The text was updated successfully, but these errors were encountered: