![]() We need to generate a Development Key Hash.For the default activity name, use youp_packagename.MainActivity.In your AndroidManifest file, copy the package name of your app and paste it into the package name field. ![]() In the Facebook console, head over to the dashboard.Copy the OAuth redirect URI we need to set up our app with Facebook.Copy the App_id and Secret then, paste to the fields we left empty on the Facebook sign-in method.You will be redirected to a page showing the App_ID` and secret as shown below. In the dashboard, click basic under settings.Enter your App Name, Contact Email and App Purpose then, continue to create the app.Head over to Facebook Developer Console.We can obtain these from Facebook Developer Console. Under the project, select authentication, then enable Facebook and Google.You can follow this guide for the creation process. Create a new Firebase project if you don’t have one yet.The final project structure should look like this:įirebase is used as our database and to provide the Authentication API as well. These are the UI files rendered for the users. Next, create another folder called Screens and add two files login.dart, and homepage.dart in the folder. In this folder, create a file called authservice.dart to authorize logic for the application. In the lib folder create a folder called services. We will do most of the coding in the lib folder. You can follow this guide to create the new application. Project setupĬreate a new Flutter application. The home screen has a log out button the logs the user out and takes them to the login screen once more. Depending on the method a user chooses, the app calls a function to authorize the user and redirect him/her to a home screen where we display their name and profile image fetched from the social account selected. On the login screen, a user chooses whether to log in with Facebook or with Google. ![]() We will create two screens, one screen for logging in and the second screen as the home screen that can only be accessed once a user is authorized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |