The configuration for all the strategies is somewhat similar. For the Google strategy, the following are the steps we have to follow for configuration:
- Creating and registering an application on Google. This will provide us with a consumer key (API key) and a consumer secret (API secret).
- Adding a button to our login page that allows our users to log in via Google.
- Adding the necessary routes.
- Adding a middleware method to check authentication.
- Redirecting the user to the home page and displaying the logged-in user's email in the top bar.
Let's dive into the details for each of the preceding steps.