Skip to content

Commit e9bc35c

Browse files
Light copy edit to README
1 parent e5bde62 commit e9bc35c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

auth/README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ customizable UI bindings on top of the core
66
code and promote best practices (both user experience and security) for
77
authentication.
88

9-
A simple API is provided for drop-in user authentication which handles
10-
the flow of signing in users with Email/Password,
11-
Google Sign-In, and Facebook Login. It is built on top of the
9+
A simple API is provided for drop-in user authentication which handles the flow
10+
of signing in users with email addresses and passwords, and federated identity
11+
providers such as Google Sign-In, and Facebook Login. It is built on top of
1212
[Firebase Auth](https://firebase.google.com/docs/auth).
1313

1414
The best practices embodied in FirebaseUI aim to maximize sign-in
@@ -67,7 +67,7 @@ these authentication methods are first configured in the Firebase console.
6767
FirebaseUI client-side configuration for Google sign-in is then provided
6868
automatically by the
6969
[google-services gradle plugin](https://developers.google.com/android/guides/google-services-plugin).
70-
If support for Facebook Sign-in is also required, define the
70+
If support for Facebook Login is also required, define the
7171
resource string `facebook_application_id` to match the application ID in
7272
the [Facebook developer dashboard](https://developers.facebook.com):
7373

@@ -81,15 +81,15 @@ the [Facebook developer dashboard](https://developers.facebook.com):
8181
```
8282

8383
If support for Twitter Sign-in is also required, define the resource strings
84-
twitter_consumer_key and twitter_consumer_secret to match the values of your Twitter app as
85-
reported by the [Twitter application manager](https://dev.twitter.com/apps).
84+
`twitter_consumer_key` and `twitter_consumer_secret` to match the values of your
85+
Twitter app as reported by the
86+
[Twitter application manager](https://dev.twitter.com/apps).
8687

8788
```
8889
<resources>
8990
<string name="twitter_consumer_key" translatable="false">YOURCONSUMERKEY</string>
9091
<string name="twitter_consumer_secret" translatable="false">YOURCONSUMERSECRET</string>
9192
</resources>
92-
9393
```
9494

9595
## Using FirebaseUI for Authentication
@@ -112,13 +112,14 @@ The entry point to the authentication flow is the
112112
If your application uses the default `FirebaseApp` instance, an AuthUI
113113
instance can be retrieved simply by calling `AuthUI.getInstance()`.
114114
If an alternative app instance is required, call
115-
`AuthUI.getInstance(app)` instead, passing the appropriate FirebaseApp instance.
115+
`AuthUI.getInstance(app)` instead, passing the appropriate `FirebaseApp`
116+
instance.
116117

117118
### Sign in
118119

119120
If a user is not currently signed in, as can be determined by checking
120-
`auth.getCurrentUser() != null`, where auth is the FirebaseAuth instance
121-
associated with your FirebaseApp, then the sign-in process can be started by
121+
`auth.getCurrentUser() != null` (where `auth` is the `FirebaseAuth` instance
122+
associated with your `FirebaseApp`), then the sign-in process can be started by
122123
creating a sign-in intent using `AuthUI.SignInIntentBuilder`. A builder instance
123124
can be retrieved by calling `createSignInIntentBuilder()` on the retrieved
124125
AuthUI instance.
@@ -129,9 +130,8 @@ The builder provides the following customization options for the authentication
129130
- The terms of service URL for your app can be specified, which is included as
130131
a link in the small-print of the account creation step for new users. If no
131132
terms of service URL is provided, the associated small-print is omitted.
132-
133133
- A custom theme can be specified for the flow, which is applied to all the
134-
activities in the flow for consistent customization of colors and typography.
134+
activities in the flow for consistent colors and typography.
135135

136136
#### Sign-in examples
137137

@@ -175,8 +175,8 @@ startActivityForResult(
175175

176176
By default, FirebaseUI uses [Smart Lock for Passwords](https://developers.google.com/identity/smartlock-passwords/android/)
177177
to store the user's credentials and automatically sign users into your app on subsequent attempts.
178-
Using SmartLock is recommended to provide the best user experience, but in some cases you may want
179-
to disable SmartLock for testing or development. To disable SmartLock, you can use the
178+
Using Smart Lock is recommended to provide the best user experience, but in some cases you may want
179+
to disable Smart Lock for testing or development. To disable Smart Lock, you can use the
180180
`setIsSmartLockEnabled` method when building your sign-in Intent:
181181

182182
```java
@@ -188,8 +188,8 @@ startActivityForResult(
188188
RC_SIGN_IN);
189189
```
190190

191-
It is often desirable to disable SmartLock in development but enable it in production. To achieve
192-
this, you can use the `BuildConfig.DEBUG` flag to control SmartLock:
191+
It is often desirable to disable Smart Lock in development but enable it in production. To achieve
192+
this, you can use the `BuildConfig.DEBUG` flag to control Smart Lock:
193193

194194
```java
195195
startActivityForResult(
@@ -208,7 +208,7 @@ The authentication flow only provides three response codes:
208208
sign in failed, and `ResultCodes.RESULT_NO_NETWORK` if sign in failed due to a lack of network connectivity.
209209
No further information on failure is provided as it is not
210210
typically useful; the only recourse for most apps if sign in fails is to ask
211-
the user to sign in again later, or proceed with an anonymous account if
211+
the user to sign in again later, or proceed with anonymous sign-in if
212212
supported.
213213

214214
```java
@@ -221,7 +221,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
221221
return;
222222
}
223223

224-
// Sign in cancelled
224+
// Sign in canceled
225225
if (resultCode == RESULT_CANCELED) {
226226
showSnackbar(R.string.sign_in_cancelled);
227227
return;
@@ -232,7 +232,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
232232
showSnackbar(R.string.no_internet_connection);
233233
return;
234234
}
235-
235+
236236
// User is not signed in. Maybe just wait for the user to press
237237
// "sign in" again, or show a message.
238238
}
@@ -300,9 +300,9 @@ if (v.getId() == R.id.sign_out) {
300300
With the integrations provided by FirebaseUI Auth, deleting a user is a multi-stage process:
301301

302302
1. The user must be deleted from Firebase Auth.
303-
2. SmartLock for Passwords must be told to delete any existing Credentials for the user, so
303+
2. Smart Lock for Passwords must be told to delete any existing Credentials for the user, so
304304
that they are not automatically prompted to sign in with a saved credential in the future.
305-
305+
306306
This process is encapsulated by the `AuthUI.delete()` method, which returns a `Task` representing
307307
the entire operation:
308308

@@ -387,7 +387,7 @@ redefine a string to change it, for example:
387387
### OAuth Scope Customization
388388

389389
#### Google
390-
By default, FirebaseUI requests the `email` and `profile` scopes when using Google Sign In. If you
390+
By default, FirebaseUI requests the `email` and `profile` scopes when using Google Sign-In. If you
391391
would like to request additional scopes from the user, call `setPermissions` on the
392392
`AuthUI.IdpConfig.Builder` when initializing FirebaseUI.
393393

0 commit comments

Comments
 (0)