Authentication through Uber native apps #293
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements two major features:
Native authentication
Depending on the supplied configuration, the implementer may want auth to occur from inside the Uber app, as opposed to internal to the SDK in an embedded web browser.
Pulling from the code comments:
Redirect URI handling
After authenticating in the native app, the success/failure response will be sent back to the calling app via deeplink. This then needs to be forwarded to the lib via the
UberAuth.handle()
method.Logic is fairly simple here, we parse the response url using
AuthorizationCodeResponseParser
and call the store completion with the result.Testing
Manually
Prerequisite: Have at least one of Uber, UberEats, or UberDriver installed
9QZcD_Ki6NbhGCrVXSUHCxfevm-C9Khj
App should deep link to the 1P uber client then return to the sample app with the authorization code
Unit tests
Unit tests added for all logic heavy classes
Video
native.MP4