Skip to main content
Group

Mobile SDK

This group discusses - Announcements on the latest Mobile SDK Versions. - Guidance on using the Mobile SDK to build mobile applications using native iOS/Android, React Native, hybrid or HTML5 approaches.

Is Lightning Out 2.0 supported with Mobile SDK?  

 

I get CSP error:  

 

[Error] Refused to load

https://<MY-DOMAIN>.my.salesforce.com/lwr/application/amd/0/ai/lightningout%<BUNCH-OF-PARAMETERS>

because it does not appear in the frame-ancestors directive of the Content Security Policy. 

[Error] Failed to load resource: the server responded with a status of 404 () (source, line 0) 

 

I believe this error is because there is no domain to add to Salesforce Setup -> Session Settings. 

 

I opened a case with Salesforce Support and they directed me here to this forum. 

 

The original Lightning Out works with Mobile SDK, so I am hoping Salesforce isn't removing functionality.

1 answer
  1. Yesterday, 5:48 PM

    Thanks for raising this. Lightning Out 2.0 is not currently supported with the Mobile SDK.

    The LWC template that supported Lightning Out 1.0 was removed in Mobile SDK 13.0, and we haven't added Lightning Out 2.0 support. 

0/9000

We are facing an issue while logging in to our custom Android application built using the Salesforce Mobile SDK. When users attempt to log in, Salesforce displays the "Verify Your Identity" page, asking them to authenticate using a passkey. 

1. App Type: Custom Android application (Salesforce Mobile SDK)

2. Login URL: https://login.salesforce.com

3. OAuth authentication is successful, but users are prompted with Verify Your Identity. 

The page asks users to "Use any passkey on your account." 

4. After successful authentication, our application sometimes shows a blank screen instead of completing the login.  

Any guidance would be greatly appreciated. 

 

 

 

Salesforce Login Stuck on

 

 

1 answer
  1. Aug 5, 5:32 PM

    You need to pre-configure advanced authentication in your organization and you need to use your my domain as your login server in the application. 

     

    For more information see

    this knowledge article, in particular the paragraph about "How are logins via the Salesforce mobile app on Salesforce Mobile SDK logins affected?".

     

     

0/9000

I'm not entirely sure if this is the right place to ask, but I have a couple of questions regarding the login functionality and Built-in Authenticator behavior when using the Salesforce Mobile SDK. 

 

1. Connection/Endpoint Memory Feature in Mobile SDK

  

In the Salesforce Mobile App, when a user logs in with their credentials and later logs out, the organization's URL (presumably the My Domain URL) is automatically added and saved to the "Choose Connection" screen. Even after restarting the app, this endpoint remains selected by default unless manually changed.

 

Question:

Does the Salesforce Mobile SDK provide a similar feature to add logged-in org URL to the "Change Server" screen and remember the connection/endpoint? 

 

 

2. Built-in Authenticator (Passkeys) and MFA Login Behavior

 

Suppose a user has MFA enabled. They log into an org via a custom Salesforce Mobile SDK app and create a Built-in Authenticator (Passkey) during the login process. Later, when the same user attempts to log into the same org from a desktop browser using the previously created passkey, a QR code is displayed on the desktop screen. The user must scan this QR code with their mobile device to complete the login.

(Note: I observed the exact same behavior when creating a built-in authenticator from the standard Salesforce Mobile App.) 

 

Questions:

  • Is this cross-device login flow (scanning a QR code on the desktop with the mobile device) the expected behavior according to the Salesforce Mobile SDK specifications?
  • Are there any official documentation or reference materials detailing this specific flow (creating a built-in authenticator via a Mobile SDK app and utilizing it for cross-device desktop logins)?

Any insights, official references, or guidance would be greatly appreciated.

Thank you.

2 answers
  1. Jun 11, 1:32 PM

    1. Connection / Endpoint Memory in Mobile SDK

    • No, the Mobile SDK does not natively replicate the “Choose Connection” memory behavior of the Salesforce Mobile App.
    • The standard Salesforce app maintains a local list of previously used endpoints (My Domain / server URLs).
    • In Mobile SDK: 
      • You must implement this behavior yourself
      • Store the selected login host (e.g., My Domain URL) locally (SharedPreferences / Keychain / local storage)
      • Pre-populate the “Change Server” or login host in your custom UI

    Conclusion:

     

    This feature is

    not built-in in SDK; it requires custom implementation.

    2. Built-in Authenticator (Passkey) & Cross-Device Login

    • Yes, this is expected and standard behavior.
    • When a passkey (Built-in Authenticator) is created on a mobile device: 
      • It is bound to that device/platform authenticator
      • When logging in from another device (desktop): 
        • Salesforce uses FIDO2/WebAuthn cross-device authentication
        • A QR code is shown
        • The mobile device completes authentication

    Conclusion:

    • QR-based cross-device login is by design, not SDK-specific
    • It follows WebAuthn / passkey standards implemented by Salesforce MFA
0/9000

Clarification needed:launchMode for LoginActivity in Advanced Authentication (Android) 

 

I am currently implementing Advanced Authentication for our Android app using the Salesforce Mobile SDK 13.2.1, and I noticed a discrepancy between the official documentation and the SDK's source code regarding the launchMode configuration. 

 

According to the Advanced Authentication documentation(

https://developer.salesforce.com/docs/platform/mobile-sdk/guide/auth-android-advanced.html

), the required android:launchMode for LoginActivity should be singleInstance. 

However, looking at the LoginActivity in the Salesforce Mobile SDK source code, the launchMode is currently set to singleTask. 

 

To strictly follow the documentation and set the launchMode to singleInstance in my application's AndroidManifest.xml, I have to explicitly define tools:replace="android:launchMode". This adds an extra step that isn't mentioned in the sample code provided in the article. 

 

Could you please clarify which approach is the correct/recommended one? 

・Option A: Leave it as singleTask (to align with the SDK's default behavior). 

・Option B: Override it to singleInstance using tools:replace="android:launchMode" (as suggested in the documentation). 

 

Thank you.

1 answer
  1. Jun 4, 7:20 PM

    Hello @Hiroshi Iwama,   

     

    Thank you for bringing this to our attention!  You are correct that LoginActivity uses 

    singleTask and therefore your AndroidManifest must specify the same launch mode for Advanced Authentication.  We will update the documentation ASAP with the correct value (singleTask). 

     

    P.S. The theme also appears to be out of date, "@style/SalesforceSDK" is the correct value as seen here.   

     

    Appologies for any inconvenience, 

    Brandon

0/9000

I am currently working on an iOS app using the Salesforce Mobile SDK and am in the process of supporting MFA. I've encountered an issue where an error occurs during the built-in authenticator registration process. 

 

I'm hoping someone might have some insights or workarounds for this. 

 

Environment & Prerequisites 

• SDK Version: Salesforce Mobile SDK 13.2.1 (iOS) 

• Platform: iOS 

• Login Method: Using the "Login For Admin" feature 

• Org Settings: 

• In "Identity Verification", [Let users verify their identity with a built-in authenticator such as Touch ID or Windows Hello] is Enabled. 

• MFA is required for the user via either of the following: 

Assigned a Permission Set with Multi-Factor Authentication for User Interface Logins enabled. 

Or, Require multi-factor authentication (MFA) for all direct UI logins to your Salesforce org is Enabled in the Identity Verification settings. 

 

Steps to Reproduce 

Log in to the configured org from the iOS app using "Login for Admin". 

After the initial authentication, a prompt appears to register a built-in authenticator (e.g., Touch ID / Face ID). 

Upon proceeding with the registration, an error is displayed and the registration cannot be completed. 

Error registering built-in Authenticator during

 

References & Context 

I am currently referring to the following Knowledge Article while investigating: 

https://help.salesforce.com/s/articleView?id=005321563&type=1

 

 

When testing an Android app using the exact same Salesforce Mobile SDK 13.2.1 against the same org, I was able to successfully register the built-in authenticator without errors. 

 

Has anyone experienced a similar issue or found a workaround/implementation strategy to bypass this? Any advice would be greatly appreciated. 

Thank you.

3 answers
  1. Jun 2, 1:45 AM

    Since it's only happening on iOS I would recommend checking the following settings on the device, missing any of them could cause that error:

    • Signed in to iCloud
    • Enable “Sync this iPhone” under “iCloud Passwords & Keychain” in Settings → iCloud → Passwords 
    • Enable “Autofill from Passwords” in Settings General → Autofill & Passwords
    • Passcode, Face ID or Touch ID enabled in Settings → Face ID & Passcode
0/9000

Questions regarding the new username-first login flow (Mobile SDK 13.2.1) 

 

 

I have questions regarding the new login flow mentioned in the release notes. 

 

On the SalesforceMobileSDK 13.2.1 releases pages, there is the following note: 

 

"Note: Starting in June 2026, Salesforce prompts users to enter only their username as the first login step." 

(

https://github.com/forcedotcom/SalesforceMobileSDK-Android/releases/tag/v13.2.1https://github.com/forcedotcom/SalesforceMobileSDK-iOS/releases/tag/v13.2.1

 

We have already upgraded our Android/iOS app to Salesforce Mobile SDK 13.2.1 and it is now June 2026, but we are still seeing the traditional login screen (where both username and password fields are displayed on the same page) instead of the new username-only UI. 

 

Could you please clarify the following points?

  1.  SDK Support & Configuration: Is the username-first UI already fully supported and active in SDK 13.2.1? If it is already supported, is there any specific configuration, setting, or endpoint change required on our end to enable and display this new UI?
  2. Expected User Flow: What is the expected behavior after a user enters their username? Does the app then redirect the user to their specific "My Domain" URL? Furthermore, if Advanced Authentication is configured for that org, will it automatically launch the browser (or Chrome Custom Tabs) at that point?
  3. Org Type Restrictions: Is this new username-first login flow restricted to Production orgs only? Or is it possible to login to a Developer Edition org with this new username-first login UI? 

     

    Thank you.

2 answers
  1. Jun 4, 6:06 PM

    SSO and native-browser authentication are separate concerns.

    SSO can work in either an embedded web view or a system browser (ASWebAuthenticationSession / Chrome Custom Tabs). What often requires a system browser is the underlying authentication method (for example, passkeys/WebAuthn, certificate-based authentication, or browser-cookie-based SSO), not SSO itself.

     

    When a login host is configured, the Mobile SDK can fetch Salesforce's well-known auth configuration for that host. That configuration is used to determine whether authentication should run in a native browser or in the SDK's default web view.

     

    When no login host is configured, the SDK cannot fetch that configuration and therefore falls back to its default authentication behavior. Authentication and SSO may still work, but if the org's authentication setup requires a native browser, the SDK won't know to switch to one.

     

    So configuring the login host is not required for SSO in general. It is required if you need the Mobile SDK to retrieve the org's well-known auth configuration and honor its browser-selection guidance.

0/9000

Hi, 

We have an org scheduled to be migrated to hyperforce. We have a mobile app that has been created using Salesforce Mobile SDK and React Native. The current Salesforce Mobile SDK Version is 12.1.1. Is this version safe and compatible with the hyperforce migration? If not then what minimum SDK version is required for the hyperforce compatibility ?

1 answer
  1. Oct 27, 2025, 6:42 PM

    The Hyperforce migration should not affect client applications. Apps built with any version of the Mobile SDK are expected to continue working as usual. That said, we strongly recommend upgrading to the latest version of the Mobile SDK whenever possible, as we only provide patches and updates for the most recent releases.

0/9000

We have a salesforce Application which is created on top of Salesforce React Native SDK where we are getting error when application is trying to get Refresh Token. 

 

Error: Remote Access 2.0 | OAuth Refresh Token for Hybrid Apps | Failed: Missing Consumer Key Parameter | Hindforce App |

test.salesforce.com

 

 

We are using salesforce React Native SDK.

5 answers
  1. Jun 2, 7:31 AM

    Hi @Shivam Singh @CRM Aligned, I can able to resolve the Missing Consumer Key parameter issue by unchecking the "Require Secret for Web Server Flow" checkbox in connected app security settings.

0/9000

Mobile SDK 13.2.1 is live to the world! 

 

Mobile SDK 13.2.1 is a minor patch release that features these changes. 

 

Phishing-Resistant MFA via Login for Admin

 

We added a **Login for Admin** menu item that forces advanced, browser-based authentication, which is a requirement for phishing-resistant multi-factor authentication (MFA). After forcing advanced authentication, the **Login for Admin** flow prompts the user to register or log in with a passkey. In Mobile SDK 13.2.0 and earlier, admin users can be blocked from logging in unless their org preconfigures advanced authentication in their **My Domain** settings and uses the My Domain URL to log in. See Using Advanced Authentication

 

Passkey and Identity Verification Support

 

We added passkey and identity verification support for enhanced authentication security. If configured to enable passkeys, the app automatically prompts the user to verify their identity and save a passkey when logging in. If not enabled by default, passkeys can be configured on the server-side. See Salesforce Help: Enable Passwordless Login with Passkeys

 

Android Support for Refresh Token Migration

 

We added Android support for refresh token migration, which now works on both platforms (Android and iOS). See Refresh Token Migration

 

GRAB THE LATEST HERE 

Android: GitHub, npm

iOS: GitHub, npm

Hybrid: npm

React Native: npm

Sfdx plugin: npm

0/9000

I am experimenting with Native iOS Mobile SDK version 11.1. When I am using the default bootconfig parameters of "remoteAccessConsumerKey" and "oauthRedirectURI" it is working fine, but when I am putting my connected app consumer key and redirect URI I am getting error

 

CLASS: SFSDKAuthHelper Authentication failed: invalid client credentials.

-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:]  perform input operation requires a valid sessionID

-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:]  perform input operation requires a valid sessionID

I am assuming my connected app setup is not right, but it is very basic connected app setup that is mentioned in this trailhead module.

https://trailhead.salesforce.com/content/learn/modules/mobile_sdk_native_ios/mobilesdk_ios_getting_started

 

Can anyone please help me understand where I am going wrong ? 

 

Thank you,

2 answers
  1. Apr 21, 4:08 PM
    I already have that unchecked, still getting error invalid user name while try to login to the sample git repo of AndroidNativeLoginTemplate. everything is checked and followed every step to create community app and site. any help will be appropriated.
0/9000