As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
When I logout from an account and do login with another account it logs in with the previous one
B
Braiek Miled
started a topic
over 6 years ago
Hello Coders,
I have this problem with the logout, it doesn't work properly for me. In fact when I log out from an account and I do log in with another one it logs in with the previous one (that is supposed to be logged out). Here is the code of log out function :
logout: function () {
$rootScope.$broadcast('auth.logout');
return $q.resolve($kinvey.User.getActiveUser()).then(function (user) {
if (user) {
return user.logout();
}
});
}
Are you confirming whether user A is successfully logged out before attempting login for user B as this is an asynchronous call? I think you are trying to login user B before user A is successfully logged out. You can try printing 'user' information before and after login and logout calls.
Are you getting any error while implementing this? If yes, please send a screenshot of the same.
I tried the logout with the code proposed by http://devcenter.kinvey.com/nodejs/guides/users#logout , but it has the same problem. In fact when I log in with User B and I find userA's dashboard and I reload the page The dashboard of User B appears. Also when I reload the login page just after the log out of User A and I log in with User B everything goes well.
i don't know if this will help you resolving the problem. Otherwise I need to make the logout a synchronously process do you know how to do it ?
Thanks Regards Miled
B
Braiek Miled
said
over 6 years ago
Here you find the active user details at each step Regards
Here you find the screenshots. The first I printed "$kinvey.User.getActiveUser()" for the first login. The second is for the logout from that account and the last one for the login with another account.
Can you please print out the user variable ($kinvey.User.getActiveUser() and any other variables you are using) before log in and after logout and then relogging in with a different user? Let me know what it prints in detail.
All Kinvey calls are Asynchronous. There is no way to make them synchronous.
Braiek Miled
Hello Coders,
I have this problem with the logout, it doesn't work properly for me. In fact when I log out from an account and I do log in with another one it logs in with the previous one (that is supposed to be logged out).
Here is the code of log out function :
Any Help !!
Please check methods 'me', http://devcenter.kinvey.com/nodejs/reference/api/class/src/entity/src/user.js~User.html
Thanks,
Pranav
- Oldest First
- Popular
- Newest First
Sorted by PopularPranav J
Thanks,
Pranav
Kinvey
Braiek Miled
Hello Pranav,
I tried the logout with the code proposed by http://devcenter.kinvey.com/nodejs/guides/users#logout , but it has the same problem.
In fact when I log in with User B and I find userA's dashboard and I reload the page The dashboard of User B appears.
Also when I reload the login page just after the log out of User A and I log in with User B everything goes well.
i don't know if this will help you resolving the problem. Otherwise I need to make the logout a synchronously process do you know how to do it ?
Thanks
Regards
Miled
Braiek Miled
Here you find the active user details at each step
Regards
Pranav J
Looking at the screenshots, user B is getting logged in properly. This is working as expected.
Thanks,
Pranav
Pranav J
Please check methods 'me', http://devcenter.kinvey.com/nodejs/reference/api/class/src/entity/src/user.js~User.html
Thanks,
Pranav
Braiek Miled
Hello,
Here you find the screenshots. The first I printed "$kinvey.User.getActiveUser()" for the first login. The second is for the logout from that account and the last one for the login with another account.
Pranav J
Can you please print out the user variable ($kinvey.User.getActiveUser() and any other variables you are using) before log in and after logout and then relogging in with a different user? Let me know what it prints in detail.
All Kinvey calls are Asynchronous. There is no way to make them synchronous.
Thanks,
Pranav
Kinvey
-
How do I use Kinvey in my web app?
-
Is it safe to include keys/secrets in my client-side JavaScript app?
-
Why is the activeUser null even though I am logged in?
-
Login does not work even though credentials are valid.
-
Social login doesn’t work.
-
Appending objects to an Array (HTML5 - JS)
-
New to node.js - need bootstrap to downloadfiles from Kinvey
-
Problem with Aggregation/Grouping
-
Internal Server Error using Twitter Sign Up
-
Data Store
See all 315 topics