Book Image

.NET Core 2.0 By Example

By : Neha Shrivastava, Rishabh Verma
Book Image

.NET Core 2.0 By Example

By: Neha Shrivastava, Rishabh Verma

Overview of this book

With the rise in the number of tools and technologies available today, developers and architects are always exploring ways to create better and smarter solutions. Before, the differences between target platforms was a major roadblock, but that's not the case now. .NET Core 2.0 By Example will take you on an exciting journey to building better software. This book provides fresh and relevant content to .NET Core 2.0 in a succinct format that’s enjoyable to read. It also delivers concepts, along with the implications, design decisions, and potential pitfalls you might face when targeting Linux and Windows systems, in a logical and simple way. With the .NET framework at its center, the book comprises of five varied projects: a multiplayer Tic-tac-toe game; a real-time chat application, Let'sChat; a chatbot; a microservice-based buying-selling application; and a movie booking application. You will start each chapter with a high-level overview of the content, followed by the above example applications described in detail. By the end of each chapter, you will not only be proficient with the concepts, but you’ll also have created a tangible component in the application. By the end of the book, you will have built five solid projects using all the tools and support provided by the .NET Core 2.0 framework.
Table of Contents (16 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Implementing authentication through Facebook


Enough of the theory and samples. Time for us to convert the requirements into reality. We will start with the authentication module first. Recall that based on our discussion in the last chapter, this module needs to support a secure login, a forgotten password, as well as register user functionality. Once we are done with it, we will have completed a substantial part of our app, as per the following flowchart:

We are going to leverage Facebook authentication to implement this module of our system. We could have used any of the other providers as well, such as Twitter, Google, Microsoft, and so on, but since it's a fun chat app, Facebook is most appropriate. In Chapter 7, To the Cloud, we will see how we can support multiple authentication providers and let the user decide which provider they wish to use for authentication. To code this module, we will perform the following steps:

  1.  To integrate Facebook with our app, we first need to create a Facebook...