15 ADDING OAUTH

In this chapter, you’ll add OAuth authentication to the Food Finder app, giving users the opportunity to log in with their GitHub accounts. You’ll also implement the wish list page to which authenticated users can add and remove locations, as well as the button component needed to accomplish this. Lastly, you’ll learn how to protect your GraphQL mutations from unauthenticated users.

Adding OAuth with next-auth

Developers usually use third-party libraries or SDKs to implement OAuth. For the Food Finder application, we’ll use the next-auth package from Auth.js, which comes with an extensive set of preconfigured templates that ...

Get The Complete Developer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.