I am using force ng library for one of my hybrid apps, but issue is I cannot find any method to log out users so that different credentials can be used.

Any idea? Thanks


Use revoke to log out. forceng doesn't have a method baked into it, but it's really just as simple as using angularjs' $http to call the appropriate endpoint.

  • 1
    great will check this out.!! – Kaushik Ray Jul 5 '16 at 21:34

forceng doesn't have the method to logout but you can write custom method to logout using SalesforceSDK

function logout(){

  var sfOAuthPlugin  = cordova.require("com.salesforce.plugin.oauth");

This method logouts current user.It will securly loggedout the user and flush the stored access and refresh token

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.