Sample OAuth application

294 552

This sample OAuth application shows how to implement OAuth authentication with PlanetScale in a Next.js application.

PlanetPets is a simple app that users sign in to using their GitHub account. Afterward, users are prompted to give PlanetPets access to their PlanetScale account. The user's organizations are then presented as "gardens" where their databases are "trees." Within PlanetPets, users can water their "trees" to grow new branches, creating a new branch in their database with a randomly generated name.

If you want to test out the app, go to

If you want to read the code or set it up yourself, see the PlanetPets GitHub repo.