Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[firebase_auth] update example app and README #1219

Merged
merged 13 commits into from
Feb 26, 2019

Conversation

cyanglaz
Copy link
Contributor

This is an improvement of the documentation and the example for flutter/flutter#16217

Added a registration flow and a sign in with email&password flow in the example app.
Separated the example app into 2 parts: registration and SignIn/SignOut.
Updated README, added a list of supported authentication methods and an example of registration.

Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Most of my suggestions are English style nits.


### Supported firebase authentication methods.

Supported authentication methods includes `Google authentication`, `Email&Password authentication`, `Phone authentication` and `Anonymously Sign in`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should include the full list if we're going to include a list them at all.

This sentence has some capitalization, spacing, grammar, and consistency issues. Maybe just have a bulleted list instead of a sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the' full list' that supported by Firebase or supported by us? The list I added here is all the supported I found in dart implementation, maybe I missed something?
Will fix the english style issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also support Twitter, Facebook, and GitHub. See the full list of auth providers here:

https://github.com/flutter/plugins/tree/master/packages/firebase_auth/lib/src/auth_provider

### Phone Auth

You can use Firebase Authentication to sign in a user by sending an SMS message to
the user's phone. The user signs in using a one-time code contained in the SMS message.

### After authentication

After a successful authentication, you should get a FirebaseUser object. You can use this object to check if the email is verified, to update email, to send verification email and etc. See [Documentation](https://pub.dartlang.org/documentation/firebase_auth/latest/firebase_auth/FirebaseUser-class.html) for more details on the FirebaseUser Object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will receive.

put backticks around FirebaseUser in both places

@@ -1,3 +1,7 @@
## 0.8.1+1

* Updates README.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would describe what changed in the example app

@@ -83,11 +83,30 @@ _handleSignIn()
.catchError((e) => print(e));
```

### Register a user

You can now register a new user using firebase_auth, e.g.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just remove this line, it seems redundant

);
```

### Supported firebase authentication methods.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firebase is always capitalized. No need for a period.

onPressed: () async {
_verifyPhoneNumber();
},
child: const Text('Veity phone number'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verify

onPressed: () async {
_signInWithPhoneNumber();
},
child: const Text('Sign in with Phone number'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to capitalize Phone

),
TextField(
controller: _smsController,
decoration: InputDecoration(labelText: 'verification code'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably capitalize Verification

}
}

class _AnonymouslySigninSection extends StatefulWidget {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize In

}
}

class _GoogleSigninSection extends StatefulWidget {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize In

## 0.8.1+2

* Update README.
* Update the example app. The example app now have two separate pages includes a `Registration` page and a `SignIn/SignOut` page. The SignIn methods included in the `SignIn/SignOut` page are:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some English language issues with this changelog entry. It might be sufficient to just say "Updated the example app with separate pages for registration and sign-in."

@@ -10,7 +10,7 @@ For Flutter plugins for other Firebase products, see [FlutterFire.md](https://gi
## Usage

### Configure the Google sign-in plugin
The Google Sign-in plugin is required to use the firebase_auth plugin. Follow the [Google sign-in plugin installation instructions](https://pub.dartlang.org/packages/google_sign_in#pub-pkg-tab-installing).
The Google Sign-in plugin is required to use the Firebase_auth plugin. Follow the [Google sign-in plugin installation instructions](https://pub.dartlang.org/packages/google_sign_in#pub-pkg-tab-installing).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't capitalize firebase_auth here

### Supported Firebase authentication methods

* `Google authentication`
* `Email&Password authentication`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say Email and password

);
```

### Supported Firebase authentication methods
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this list I think you don't need backticks, and I'd remove "authentication" since it applies to everything on the list

* `Email&Password authentication`
* `Phone authentication`
* `Anonymously Sign in`
* `Github authentication`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize H

### Phone Auth

You can use Firebase Authentication to sign in a user by sending an SMS message to
the user's phone. The user signs in using a one-time code contained in the SMS message.

### After authentication

After a successful authentication, you will receive a `FirebaseUser` object. You can use this object to check if the email is verified, to update email, to send verification email and etc. See [Documentation](https://pub.dartlang.org/documentation/firebase_auth/latest/firebase_auth/FirebaseUser-class.html) for more details on the `FirebaseUser` Object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change etc to "and so on"

I would say something like this:

See the FirebaseUser API documentation for more details.

@cyanglaz
Copy link
Contributor Author

Fixed all review issues.

@cyanglaz cyanglaz changed the title update example app and README [firebase_auth]update example app and README Feb 21, 2019
@bparrishMines bparrishMines changed the title [firebase_auth]update example app and README [firebase_auth] update example app and README Feb 22, 2019
### Phone Auth

You can use Firebase Authentication to sign in a user by sending an SMS message to
the user's phone. The user signs in using a one-time code contained in the SMS message.

### After authentication

After a successful authentication, you will receive a `FirebaseUser` object. You can use this object to check if the email is verified, to update email, to send verification email and so on. See the [FirebaseUser](https://pub.dartlang.org/documentation/firebase_auth/latest/firebase_auth/FirebaseUser-class.html) API documentation for more details on the `FirebaseUser` Object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to capitalize Object

@cyanglaz cyanglaz merged commit bb75009 into flutter:master Feb 26, 2019
@cyanglaz cyanglaz deleted the firebase_auth_example_doc branch February 27, 2019 17:55
romaluca pushed a commit to romaluca/plugins that referenced this pull request Mar 6, 2019
This is an improvement of the documentation and the example for [flutter/flutter#16217](flutter/flutter#16217)

Added a registration flow and a sign in with email&password flow in the example app.
Separated the example app into 2 parts: registration and SignIn/SignOut.
Updated README, added a list of supported authentication methods and an example of registration.
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
This is an improvement of the documentation and the example for [flutter/flutter#16217](flutter/flutter#16217)

Added a registration flow and a sign in with email&password flow in the example app.
Separated the example app into 2 parts: registration and SignIn/SignOut.
Updated README, added a list of supported authentication methods and an example of registration.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants