From the course: Unity: Working with Google Firebase
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Add a login
- [Instructor] For the login functionality, we're going to do almost exactly the same thing with our auth manager. Underneath our Signup New User, we're going to create a new method called public void LogininExistingUser. It's also going to take in an email and a password, and we're going to use our auth variable, but instead of calling CreateUserWith, we're going to call SignInWithEmailAndPasswordASync. And it works basically the same way. Pass in our email, our password, we use the ContinueWith method, and then we're going to capture the return task, and execute something in that return block. Here we're going to use StartCoroutine, we're going to return our authCallback, and we're going to pass in this task, and for the operation, we're going to say it's called Login. Don't forget to close the double parentheses here which StartCoroutine. Since our delegate and callback method are already hooked up, there's nothing else we really need to do in the auth manager. The last thing we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.