forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce
Other
341 stars 388 forks source link

Support for JWT-based access token #2632

Closed wmathurin closed 1 week ago

wmathurin commented 2 weeks ago

Overview

Connected app / external client app can be configured to issue JWT-based access token (for more information see here).

The mobile application does not need to know if it is using a JWT-based access token or an opaque token in most cases. Login and refresh will just work as before.

However, front door URL cannot be built directly using the JWT-based access token. Instead the single access API should be called to generate front door URL.

We already made changes in the Mobile SDK to be JWT-based access token ready:

Changes in this PR

Testing

wmathurin commented 2 weeks ago

NB: I decided not to change the transparent refresh logic. I'm not sure that the added complexity of preemptively refreshing before sending a request if using an expired JWT-based access is worth doing. Thoughts?

mobilesdk-bot commented 2 weeks ago
1 Warning
:warning: No Lint Results.

Tests results for SalesforceHybrid

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 2 weeks ago
1 Warning
:warning: No Lint Results.

Tests results for SalesforceSDK

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 2 weeks ago
1 Warning
:warning: No Lint Results.

Tests results for MobileSync

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 2 weeks ago
1 Warning
:warning: No Lint Results.

Tests results for SmartStore

Generated by :no_entry_sign: Danger