function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gerardo BiancoGerardo Bianco 

Changing login page of a mobile app built on Salesforce mobile SDK

Hi, 

I am building an Hybrid app, using Salesforce mobile SDK 2.2.
When starting the app, I land in the "standard" Salesforce Login page. I am not sure if this page is inside the Salesforce MobileSDK or it it is serverd directly from Salesforce.com servers.

Is there a way to change the branding of the login page (where the user is required to insert username and password) with custom logo?

Alternatively can I use a different Login Page and if yes where do I set this in the MobileSDK?

Consider my app is Hybrid for IOS. 

I attache the image of the page I would like to change
Page to change
Thanks a lot
Hargobind_SinghHargobind_Singh
Hi Gerardo, 

I saw the same issue with my team a while ago, but we were not able to byepass it. SFDC Libraries show this page. 

I dived deeper and found that if we try to build our own page and fill Username and password, and use oAuth, then we don't get the refresh token, and user would need to login again. Here is some information: https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

I would suggest go with this page itself, This is the most secure option as you won't need to worry about making sure that username password are passed securely, and you would be able to authenticate user for longer periods using refresh tokens. However, you can build your own interface and use oAuth, as outlined in the link above. 


RishavRishav
HI Gerardo,
          yes correct this "loginl.salesforce.com" is fixed inside the salesforce SDK .  As i have seen this is mentioned on two places 
   1. server.xml (A file that contains the login servers url)
    2. loginManager.java.

HI hargobind,
Are you talking about the building the custom login pages for portal. If you have implemented this then can you tell me that , can i use the REST API with community user to give them data in android UI .

Thanks 
Rishav
akhilesh_sfdcakhilesh_sfdc
You can point the Mobile SDK to a custom my domain URL. Simplest way to do this is to go in iOS settings app, then choose your SDK based app and change the login host to set as custom host with my domains URL.

Join the Salesforce Mobile SDK community at https://plus.google.com/u/1/communities/114225252149514546445