Saving Authenticated Users in Cockroach DB

Hey everyone,

I hope you’re doing well. I’m currently working on building an application using Prisma, Cockroach DB, and the Pangea Auth API. I stumbled upon this boilerplate (GitHub - pangeacyber/pangea-integration-nextjs-authn), and I’m building my app based on it.

I’ve encountered a challenge I could use some help with. Specifically, I’m trying to figure out how to save authenticated users into the Cockroach DB, but I’m not quite sure how to proceed.

Any advice or guidance on this would be greatly appreciated.

What about your users would you like to store?

A common pattern we see is using a table likely with their name, email and pangea ID along with any app specific information. Pangea stores the authentication methods, first name, last name, and email of your users.

At the moment, I would like to store the user id which could be the pangea id. In my database schema, I have some models that depend on the user’s id

I also want to store the user’s first name and email as those will be associated with some models in my database @pangea.michael

All of that is available in both the /v2/client/userinfo and /v2/client/session/list endpoints.

Documentation can be found here.

How can I provide feedback to the Pangea team regarding the documentation?

Hi, @iggy_eth. I hope you continue to use Pangea APIs. If so, and if you come across unhelpful places in the docs, you can talk to me directly - here, or we can schedule an online meeting. You an always use the Contact us link at the bottom of a doc, info@pangea.cloud, if you prefer :slightly_smiling_face: