skip to Main Content

I am new to supabase and am trying to integrate my Todo App made with BlueBase, a Framework based on react and react native. And, I am facing such a problem.

CreateTaskScreen.tsx

import React from 'react';

import CreateTaskForm from '../../components/CreateTaskForm';

export const CreateTaskScreen = () => {
    return (
        <CreateTaskForm />
    );
};

CreateTaskScreen.displayName = 'CreateTaskScreen';

index.ts

export * from './CreateTaskScreen';

import { CreateTaskScreen } from './CreateTaskScreen';
export default CreateTaskScreen;

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Enter the API URL and API Key carefully. It will resolve your 'new row violates row-level security policy for table "tasks"' - Error. And also follow the blue base documentation to create a table carefully. Enter Table Name, Type, and Default Value carefully. Also, the default value of id is uuid_generate_v4(). You can see it in the suggestions.

    enter image description here


  2. Adding a policy seems like the best way, with this you don’t need to disable the RLS policy and don’t need to use a secret key which is very unsafe for your data.

    To do this,

    1. Go to "Authentication" > "Policies" > Select the "New
      Policy"
      table

      step-1

    2. Then add from the template for policy insert data.

      step-2

    3. Follow the next steps

      step-3

    4. Review your policy

    5. Save New Policy

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search