Skip to content
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

AuthHelper.loginIfRequired { } retaining the closures in memory #3694

Open
MehtabAhmad opened this issue Mar 21, 2024 · 3 comments
Open

AuthHelper.loginIfRequired { } retaining the closures in memory #3694

MehtabAhmad opened this issue Mar 21, 2024 · 3 comments

Comments

@MehtabAhmad
Copy link

MehtabAhmad commented Mar 21, 2024

Please fill out the following details:

  1. Version of Mobile SDK Used: 10.2.0
  2. Issue found in Native App or Hybrid App: Native iOS app
  3. OS Version: 17.0
  4. Device: iPhone 14 pro
  5. Steps to reproduce:
    i - Call AuthHelper.loginIfRequired(callback1) at any point in the app, for example, at screen A.
    ii - Logout from the app.
    iii - Call AuthHelper.loginIfRequired(callback2) from a different place in the app, such as screen C
    iv - After successfully logging in from screen C, observe that instead of calling callback2 directly on screen C, it first calls callback1 on screen A and then callback2 on screen C.
    Note that subsequent calls to AuthHelper.loginIfRequired after login will execute all previously passed callbacks, regardless of their origin.
  6. Actual behavior:
    AuthHelper.loginIfRequired retaining previously passed closures and executing all of them when next time it gets call
  7. Expected Behavior:
    Should only execute the last call back passed to it
  8. Error Log:
    No error logs
@wmathurin
Copy link
Contributor

10.2 was released 2 years.
Could you try with the latest version of Mobile SDK (12.0) to see if the issue still exists?

@bhagwat8024
Copy link

@wmathurin same issue happened with me also , i am using 11.0.0 version of salesforce

@bhagwat8024
Copy link

actually we have a viewController for the login page and whenever user put the credential into the login form , we are getting callback multiple times.
one more thing to notice that if i login and logout and then again login we are getting callback 2 time but again if i logout and login we are getting callback 3 time ...
it means it hold that callback into the memory block and call every time ..it increase by 1 every time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants