0

We have a custom application build on SF mobile SDK. We have a connected app on the CRM side where we use REST APIs for the communication with the mobile application. We noticed a peculiar issue on iOS device only which is not reproducible on android.

Issue - I login to the app by giving my user credentials (username and password). I logout from the app. I click on login button again instead of taking me to credentials it auto logs into the app.

Scenario 1 - Issue is only replicable when I do not clear the app from ‘recently visited app list’ : That is I login to the app, log out and return to home page and launch the app again and click on login, it auto logins me rather than taking me to the credential page.

Scenario 2 - Issue is not replicable when I clear the app from ‘recently visited app list’ : That is I login to the app, log out and return to home page and clear the app from recent list. Then launch the app again and click on login, it does not login and takes me to the credential page.

We are unable to see any difference in the debug logs as the actual login and auto login show same behavior. Oauth token is created after a successful login and revoked post successful logout for patient’s user record. This might be a scenario where the username-password is getting stored in cache or somewhere and it’s using the same information again and auto logging in instead of refreshing. I tried same with other apps (amazon,Facebook etc) and was not able to reproduce the issue.

Can anyone provide any inputs if there are any troubleshooting method to investigate this?

1

1 Answer 1

0

During login, there are short term cookies being setup which are not tied to the main session and are not invalidated if you logout right away. As a result, if you login then logout shortly after, you will skip the first screen where you enter your credentials and find yourself directly into the allow/deny screen. This issue happens only when using advanced authentication, because the login flow takes place in a ASWebAuthenticationSession. With regular authentication, we use a fresh WebView every time and therefore don't have any left over cookies.

Are you using advanced authentication?

1
  • No we have not configured advanced authentication in Salesforce CRM side, is there a possibility this is getting triggered from SDK? we tried switching on browser based authentication by enabling flags on My domain settings but that did not work as well.
    – VarshaVRK
    Commented Apr 12, 2023 at 11:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .