From the course: Build with AI: Create a Follow-Up App with React, Supabase, and Cursor
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Hashing PII
From the course: Build with AI: Create a Follow-Up App with React, Supabase, and Cursor
Hashing PII
- [Instructor] User privacy is important. In this lesson, we will learn how to mask or hash personally identifiable information, like email and phone number, so that the data is safe and secured. We'll do this in two places, the database using Postgres hashing functions and on the admin dashboard UI. In the super basic code editor, we need Postgres pgcrypto extension for hashing. So while in the editor, run this command, CREATE EXTENSION IF NOT EXIST pgcrypto. Okay, EXISTS. Okay. Run. Okay, Success. So this is what we've done. Then now let's come back to Cursor, and ask it to add new columns, which is email hash and phone hash to the leads table and then populate them automatically on insights or on updates. So let's tell Cursor what we did. We ran this query on supabase. Then what do we need to do? Add a new column to it. It's two columns. Add two new columns to the leads table. That is phone hash…