+ Start a Discussion

Mobile SDK with OAuth2.0 Username-Password Flow



I have read the article "Getting Started with the Mobile SDK for Android". And I practice the demo which the article mentioned.


I found the demo project "TemplateApp" is based on the OAuth2.0 User-Agent Flow.

So, I want to know is there has any example or article about how to use OAuth2.0 Username-Password Flow with MobileSDK?

Or is there has anybody try it ?




The MobileSDK provides an OAuth implementation for you so that you need not reimplement the OAuth flow yourself.

For example, if you install the SalesforceMobileSDK for iOS and create a new Hybrid App using the app template, it will automatically authenticate your users using OAuth.


Hope this helps...


Hi tstellanova,


Thanks for your help.

As my test, the automatically authenticate by the MobileSDK is based on the OAuth2.0 User-Agent Flow. So, if I want to use the OAuth2.0 Username-Password Flow what should I do?

Is this flow also implements by the MobileSDK and what I need to do is just change my implements interface or other way?


Thank you!


The MobileSDK doesn't support the username-password flow.


My understanding is that this is generally considered to be less secure than the default Oauth 2.0 flow provided by the SDK.