-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@W-16171409: [Android] Add QR Code Login Support in MSDK #2594
@W-16171409: [Android] Add QR Code Login Support in MSDK #2594
Conversation
For now launches QR code reader and print url to log
Using user agent flow if no pkce code verifier provided
…Style And Commentary Cleanup)
It's worth noting I did intend to include commits from the spike performed by @wmathurin. I rebased his branch on |
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Outdated
Show resolved
Hide resolved
Tests:
Tests results for SalesforceSDKGenerated by 🚫 Danger |
e0c01af
to
f9ea0e5
Compare
Hold merging this to |
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the QR Code Login work should live isn't a blocker, but the User Agent Flow issue I mentioned is.
…ing login using front door URL and code verifier to override web server Vs. user agent flow)
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2594 +/- ##
============================================
+ Coverage 51.41% 57.10% +5.69%
- Complexity 1789 2424 +635
============================================
Files 146 187 +41
Lines 12097 15204 +3107
Branches 1712 2135 +423
============================================
+ Hits 6220 8683 +2463
- Misses 5178 5615 +437
- Partials 699 906 +207
Flags with carried forward coverage won't be shown. Click here to find out more.
|
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginActivity.kt
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.kt
Show resolved
Hide resolved
…anion Member Visibility In `LoginActivity` )
…anion Member Visibility And Improve Naming In `OAuthWebViewHelper` )
Tests results for SalesforceHybridGenerated by 🚫 Danger |
Tests:
Tests results for SalesforceReactGenerated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Though I think I would still like to see us extracting the login server from the QR Code URL like Wolf mentioned here.
… Door Bridge Parameters On Authorization Failure)
Tests results for MobileSyncGenerated by 🚫 Danger |
🎸 Ready For Review! 🥁
This adds support for log in via log in QR codes generated with the UI Bridge API to MSDK. This completes a very detailed spike previously completed by @wmathurin and directly inherits from that codebase.
Before reviewing, I highly recommend reading this document and references in detail:
👉🏻 https://salesforce.quip.com/JXmvAwirhR3V
There's actually very little if any logic change from the spike code. What I did try to apply was my novice's eye to the topic so we can name and document the code such that it'll be a bit more approachable for those uninitiated to the UI Bridge API, how that is delivered via the QR code and the many touch points that has in MSDK's log in logic. I did the same in the companion pull request that introduces commented out content to our template guiding a developer through enabling this in a new app.
The companion template update is in forcedotcom/SalesforceMobileSDK-Templates#417