Skip to content

Commit 705c080

Browse files
committed
Finish #59 (or at least, I hope so)
1 parent 544fc98 commit 705c080

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

codelabs/chat/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,7 @@ First add a button to the top right of activity_main.xml
369369

370370
![main_activity.xml with login button](images/6_2.png)
371371

372-
Extend FirebaseLoginBaseActivity
373-
374-
Although extending `ListActivity` was useful earlier, when it saved some lines of code, it's now more important that we extend `FirebaseLoginBaseActivity`.
375-
376-
We'll change our `MainActivity` definition to extend `FirebaseLoginBaseActivity`.
372+
We'll change our `MainActivity` definition to extend `FirebaseLoginBaseActivity`. This allows us to make use of FirebaseUIs headful auth in the easiest way.
377373

378374
```java
379375
public class MainActivity extends FirebaseLoginBaseActivity {
@@ -397,7 +393,7 @@ listView.setAdapter(mListAdapter);
397393

398394
![Update FirebaseListAdapter code](images/6_3.png)
399395

400-
Finally we need to add a few event handlers onto `MainActivity` so we can react to login events.
396+
We'll need to add a few event handlers onto `MainActivity` so we can react to login events.
401397
402398
```java
403399
@Override
@@ -418,7 +414,7 @@ protected void onFirebaseLoginUserError(FirebaseLoginError firebaseLoginError) {
418414
419415
![Add Firebase event handlers](images/6_3.5.png)
420416
421-
Enable Password Authentication
417+
Then we can enable an auth provider. In this example we'll just use `PASSWORD` but social providers can be enabled here, too.
422418

423419
```java
424420
@Override
@@ -430,7 +426,7 @@ protected void onStart() {
430426

431427
![Enable PASSWORD auth](images/6_4.png)
432428

433-
Wire up login button
429+
We want our users to be able to click a button to be prompted to log in, so we'll wire up the button we added a moment ago to call `showFirebaseLoginPrompt()`.
434430
435431
```java
436432
Button loginButton = (Button) this.findViewById(R.id.login);
@@ -451,6 +447,10 @@ Now go into your Firebase Dashboard and go to the Auth tab and select "Email/Pas
451447

452448
This is also where you can configure the password reset emails that you can send to your users, in case they forgot their password.
453449

450+
Now run your app and click the Login button and you'll see the FirebaseUI dialog. When a user logs in the event handlers we added on our activity will be called and you can interact with their authentication data however you want.
451+
452+
<img alt="Chat login" src="images/0_1.png" height="600">
453+
454454
## Wrap-up
455455
456456
Wrap-up

0 commit comments

Comments
 (0)