You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon success, the result of the callback will contain a Client object containing all credentials necessary to authenticate your user.
73
+
Upon success, the result of the callback will contain a `Client` object containing all credentials necessary to authenticate your user.
74
74
75
75
| Property | Type | Description |
76
76
| ------------- | ------------- | ------------- |
@@ -86,7 +86,7 @@ Upon success, the result of the callback will contain a Client object containing
86
86
Upon failure, the result will contain an error of type UberAuthError. See [Errors](./Errors/README.md) for more information.
87
87
88
88
89
-
## Login Context
89
+
## Customized Login
90
90
91
91
For more complicated use cases, an auth context may be supplied to the login function. Use this type to specify additional customizations for the login experience:
92
92
@@ -110,7 +110,7 @@ UberAuth.login(
110
110
```
111
111
112
112
113
-
## Auth Destination
113
+
## Auth Destinations
114
114
115
115
There are two locations or `AuthDestination`s where authentication can be handled.
116
116
@@ -140,37 +140,9 @@ UberAuth.login(
140
140
141
141
An Auth Provider supplies logic for a specific authentication grant flow. Currently, the only supported auth provider is `AuthorizationCoreAuthProvider`.
142
142
143
-
### [WIP]AuthorizationCoreAuthProvider
143
+
### AuthorizationCoreAuthProvider
144
144
145
-
An Auth Provider that supplies performs the Authorization Code Grant Flow as specified in the [OAuth 2.0 Framework](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1).
146
-
147
-
148
-
## [WIP] Prefilling User Information
149
-
If you would like text fields during signup to be pre-populated with user information you can do so using the prefill API. Partial information is accepted.
150
-
There are two ways to provide this information:
151
-
152
-
**Using the LoginButton / DataSource**
153
-
154
-
WIP
155
-
156
-
**Using LoginManager Directly**
157
-
```
158
-
let loginManager = LoginManager(loginType: .authorizationCode)
AuthorizationCoreAuthProvider performs the Authorization Code Grant Flow as specified in the [OAuth 2.0 Framework](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1). AuthorizationCoreAuthProvider is currently the only supported auth provider.
174
146
175
147
176
148
## Responding to Redirects
@@ -257,6 +229,91 @@ Upon successful authentication, the Client object returned will contain a valid
257
229
258
230
**Note:** Authorization Code **will be nil** as it has been used for the token exchange and is no longer valid.
259
231
232
+
## Prefilling User Information
233
+
The SDK supports the OpenID `login_hint` parameter for prefilling user information when authenticating with Uber.
234
+
To pass user information into the login page, ise the Prefill API when constructing the AuthContext. Partial information is accepted.
235
+
236
+
**Note:** Prefill information is only supported using the `.inApp` login type.
Copy file name to clipboardexpand all lines: examples/README.md
+3-21
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,9 @@
2
2
3
3
## Universal Link Sample App
4
4
5
-
An example of how to authenticate with Uber services using an [auth code grant flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow).
5
+
See the [Universal Link Example Readme](./UniversalLinkExample/README.md)
6
6
7
-
This sample app will demonstrate how to:
8
-
1. Build a universal link that will launch the native Uber app if installed
9
-
2. Make a /authorize request to Uber's backend and handle the auth code in the response url
10
-
3. Exchange the auth code for a valid access token that can be used to make authenticated requests to Uber's backend services
11
7
12
-
### Setup
13
-
1. Add the sample app's redirect URI to your app's configuration in the [Uber Developer Portal](https://developer.uber.com/)
8
+
## UberSDK Sample App
14
9
15
-
`universallinkexample://app`
16
-
17
-
2. Enter your app's ClientID found in the in the sample app's Info.plist. This can also be done inside the sample app.
18
-
3.[Optional] Install the native Uber app on your device
19
-
20
-
21
-
22
-
## SDK Sample Apps
23
-
24
-
Requires Xcode 9
25
-
26
-
There are two sample apps, one written in Objective-C, and another written in Swift.
27
-
28
-
[TODO: Installation instructions]
10
+
See the [Universal Link Example Readme](./UberSDK/README.md)
In the UberSDK project's Info.plist, replace the ClientID and RedirectURI with your app's values in the [Uber Developer's Portal](https://developer.uber.com/dashboard/).
9
+
10
+
## Login
11
+
Example usage for the UberAuth login class.
12
+
13
+
### Auth Type
14
+
Specifies the auth grant flow to use for login. Authorization Code is the only option.
15
+
16
+
### Destination
17
+
Sets the auth destination for login. `.inApp` and `.native` are the only options.
18
+
If the native Uber app is not installed on the device, `.inApp` is used.
19
+
20
+
### Exchange Auth Code for Token
21
+
Determines if the authorization code should be exchanged locally for an access token
22
+
23
+
### Always ask for Login
24
+
If enabled, the Uber login page will always ask for re-authentication.
25
+
26
+
### Always ask for Consent
27
+
If enabled, the user will always have to agree to linking their account.
28
+
29
+
### Prefill Values
30
+
Allows setting optional values for prefilling user information on the login screen.
31
+
32
+
33
+
## Uber Button
34
+
Example usage of the LoginButton convenience UI for login / logout.
35
+
36
+
## Request a Ride Button
37
+
Example usage of the RideRequestButton convenience UI for requesting a ride.
38
+
To enable, first log in using either the Login or UberButton section.
An example of how to authenticate with Uber services using an [auth code grant flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow).
4
+
5
+
This sample app will demonstrate how to:
6
+
1. Build a universal link that will launch the native Uber app if installed
7
+
2. Make a /authorize request to Uber's backend and handle the auth code in the response url
8
+
3. Exchange the auth code for a valid access token that can be used to make authenticated requests to Uber's backend services
9
+
10
+
### Setup
11
+
1. Add the sample app's redirect URI to your app's configuration in the [Uber Developer Portal](https://developer.uber.com/)
12
+
13
+
`universallinkexample://app`
14
+
15
+
2. Enter your app's ClientID found in the in the sample app's Info.plist. This can also be done inside the sample app.
16
+
3.[Optional] Install the native Uber app on your device
0 commit comments