From the course: Building Android Apps with AWS

Set up user sign in with Google

From the course: Building Android Apps with AWS

Start my 1-month free trial

Set up user sign in with Google

- [Instructor] So now that we have our back end set up to do the user authentication with Google, and we've registered our app in the Google Developer Console, the next thing that we need to do is get it set up in our demo app. And so I'm starting here in the developer guide, and this is gonna show me how to implement it on the app side. And so the first step, as usual, is just telling us to make sure our configuration file is updated, which we've done that. Step two is telling us about the network permissions in the manifest, and we've done that one already. Step three has the dependencies that we need to add to the Gradle file, and we do have the mobile client and the sign in UI dependencies in there already, so I'm just gonna grab the Google sign in dependency and copy that. I'm gonna go over to Android Studio and I'm gonna paste that into my Gradle file, and I can remove this call for the support library as well. I'm gonna sync that now that I've updated my Gradle file, and then I'm gonna go back over to the developer guide and check the next steps. And actually steps four and five are just telling us to create a login activity, which we've already done that for our app, and that's all the remaining steps that we need to do. So I can go back over to Android Studio and we should be able to run the app now. So I'll just click run, and we're still running this on the Google Pixel XL emulator. And now you can see that in addition to the email and password and the Facebook button, we have a sign in with Google button, so I'm gonna try it. If I click sign in with Google, it's showing me a list of Gmail accounts that I've already signed up for on this emulator, so I've already signed in to this list maker demo account so I'm just gonna select that one. And there you go, it's logged us in. So now we have fully implemented user authentication with Google.

Contents