Skip to content

Commit

Permalink
Slightly improved doc
Browse files Browse the repository at this point in the history
  • Loading branch information
okrad committed Jul 17, 2022
1 parent eeec470 commit ba9555e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AndroidManifest.xml
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="my.test.app" />
<data android:scheme="my.test.app" /> <!-- This must correspond to the custom scheme used for instantiatng the client... See below -->
</intent-filter>
</activity>
```
Expand Down Expand Up @@ -185,17 +185,17 @@ In order to use this client you need to first configure OAuth2 credentials in th

First you need to create a new Project if it doesn't already exists, then you need to create the OAuth2 credentials ("OAuth Client ID").

Select **iOS** as *Application Type*, specify a name for the client and in the *Bundle ID* field insert your custom uri scheme
(for example 'my.test.app', but you can use whatever uri scheme you want).
Select **iOS** as *Application Type*, specify a name for the client and a *Bundle ID*.
Now edit the just created Client ID and take note of the "IOS URL scheme". This should look something like ``com.googleusercontent.apps.XXX`` and is the custom scheme you'll need to use.

Then in your code:

```dart
import 'package:oauth2_client/google_oauth2_client.dart';
OAuth2Client googleClient = GoogleOAuth2Client(
redirectUri: 'my.test.app:/oauth2redirect', //Just one slash, required by Google specs
customUriScheme: 'my.test.app'
redirectUri: 'com.googleusercontent.apps.XXX:/oauth2redirect', //Just one slash, required by Google specs
customUriScheme: 'com.googleusercontent.apps.XXX'
);
```

Expand Down

0 comments on commit ba9555e

Please sign in to comment.