forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce
Other
341 stars 388 forks source link

Native login #2517

Closed brandonpage closed 8 months ago

brandonpage commented 8 months ago

Native Login for Experience Cloud Users using headless API.

This PR includes:

Usage:

SalesforceSDKManager's initNative now takes an additional optional native login activity class.

App calls useNativeLogin in it's main activity :

SalesforceSDKManager.getInstance().useNativeLogin(clientId, redirectUri, loginUrl);

In their own UI the App calls:

val result = SalesforceSDKManager.getInstance().nativeLoginManager.login("username", "password")
mobilesdk-bot commented 8 months ago
1 Error
:no_entry_sign: libs/SalesforceSDK/src/com/salesforce/androidsdk/auth/HttpAccess.java#L144 - Missing permissions required by ConnectivityManager.getActiveNetworkInfo: android.permission.ACCESS_NETWORK_STATE
16 Warnings
:warning: libs/SalesforceSDK/AndroidManifest.xml#L0 - The project references RTL attributes, but does not explicitly enable or disable RTL support with android:supportsRtl in the manifest
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java#L210 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java#L247 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java#L707 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java#L737 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java#L777 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L104 - Do not place Android context classes in static fields (static reference to UserAccountManager which has field context pointing to Context); this is a memory leak
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L145 - Consider using apply() instead; commit writes its data to persistent storage immediately, whereas apply will handle it in the background
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L212 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L560 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L576 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.kt#L1404 - Do not place Android context classes in static fields (static reference to SalesforceSDKManager which has field context pointing to Context); this is a memory leak
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/auth/AuthenticatorService.java#L56 - Do not place Android context classes in static fields (static reference to Authenticator which has field context pointing to Context); this is a memory leak
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/rest/RestClient.java#L143 - The indentation string here is different from on the previous line (" " vs \t)
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginActivity.kt#L198 - Using setJavaScriptEnabled can introduce XSS vulnerabilities into your application, review carefully
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt#L197 - Using setJavaScriptEnabled can introduce XSS vulnerabilities into your application, review carefully

Tests results for SalesforceSDK

Generated by :no_entry_sign: Danger