{"id":22392680,"url":"https://github.com/natanaelvich/app-auth-supabase-example","last_synced_at":"2025-10-15T14:31:41.910Z","repository":{"id":209326504,"uuid":"723755127","full_name":"Natanaelvich/app-auth-supabase-example","owner":"Natanaelvich","description":"React Native User Management example with Expo and Supbase","archived":false,"fork":false,"pushed_at":"2023-12-01T01:05:39.000Z","size":863,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T07:39:47.947Z","etag":null,"topics":["authentication","expo","react-native","supabase"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Natanaelvich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-26T17:04:27.000Z","updated_at":"2025-01-25T11:06:52.000Z","dependencies_parsed_at":"2024-01-16T08:59:24.380Z","dependency_job_id":"766e628e-e852-4187-a9b0-b02e840c84c7","html_url":"https://github.com/Natanaelvich/app-auth-supabase-example","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":"0.019607843137254943","last_synced_commit":"7ff71914f6761d12ea796ae425d858fefcd8fb9e"},"previous_names":["natanaelvich/app-auth-supabase-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Natanaelvich/app-auth-supabase-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natanaelvich%2Fapp-auth-supabase-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natanaelvich%2Fapp-auth-supabase-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natanaelvich%2Fapp-auth-supabase-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natanaelvich%2Fapp-auth-supabase-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Natanaelvich","download_url":"https://codeload.github.com/Natanaelvich/app-auth-supabase-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Natanaelvich%2Fapp-auth-supabase-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279085462,"owners_count":26100017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","expo","react-native","supabase"],"created_at":"2024-12-05T04:17:06.478Z","updated_at":"2025-10-15T14:31:41.527Z","avatar_url":"https://github.com/Natanaelvich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native User Management example with Expo\n\n## Requirements\n\n- Install the [Expo CLI](https://docs.expo.io/get-started/installation/)\n\n## Setup \u0026 run locally\n\n### 1. Create new project\n\nSign up to Supabase - [https://supabase.com/dashboard](https://supabase.com/dashboard) and create a new project. Wait for your database to start.\n\n### 2. Run \"User Management Starter\" Quickstart\n\nOnce your database has started, run the \"User Management Starter\" quickstart. Inside of your project, enter the `SQL editor` tab and scroll down until you see `User Management Starter`.\n\n### 3. Get the URL and Key\n\nGo to the Project Settings (the cog icon), open the API tab, and find your API URL and `anon` key, you'll need these in the next step.\n\nThe `anon` key is your client-side API key. It allows \"anonymous access\" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this [below](#postgres-row-level-security).\n\n![image](https://user-images.githubusercontent.com/10214025/88916245-528c2680-d298-11ea-8a71-708f93e1ce4f.png)\n\n**_NOTE_**: The `service_role` key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.\n\nSet the details in the `/lib/supabase.js` file.\n\n### 4. Install the dependencies \u0026 run the project:\n\nInstall the dependencies:\n\n```bash\nnpm install\n```\n\n### 4a. For file picker\n\nIn order to get the file picker to work you must first prebuild the project before running it.\n\n```bash\nexpo prebuild\n```\n\n### 5. Run the application\n\nRun the application: `npm start`.\n\n## Supabase details\n\n### Postgres Row level security\n\nThis project uses very high-level Authorization using Postgres' Role Level Security.\nWhen you start a Postgres database on Supabase, we populate it with an `auth` schema, and some helper functions.\nWhen a user logs in, they are issued a JWT with the role `authenticated` and their UUID.\nWe can use these details to provide fine-grained control over what each user can and cannot do.\n\nThis is a trimmed-down schema, with the policies:\n\n```sql\n-- Create a table for Public Profiles\ncreate table\n  profiles (\n    id uuid references auth.users not null,\n    updated_at timestamp\n    with\n      time zone,\n      username text unique,\n      avatar_url text,\n      website text,\n      primary key (id),\n      unique (username),\n      constraint username_length check (char_length(username) \u003e= 3)\n  );\n\nalter table\n  profiles enable row level security;\n\ncreate policy \"Public profiles are viewable by everyone.\" on profiles for\nselect\n  using (true);\n\ncreate policy \"Users can insert their own profile.\" on profiles for insert\nwith\n  check (auth.uid () = id);\n\ncreate policy \"Users can update own profile.\" on profiles for\nupdate\n  using (auth.uid () = id);\n\n-- Set up Realtime!\nbegin;\n\ndrop\n  publication if exists supabase_realtime;\n\ncreate publication supabase_realtime;\n\ncommit;\n\nalter\n  publication supabase_realtime add table profiles;\n\n-- Set up Storage!\ninsert into\n  storage.buckets (id, name)\nvalues\n  ('avatars', 'avatars');\n\ncreate policy \"Avatar images are publicly accessible.\" on storage.objects for\nselect\n  using (bucket_id = 'avatars');\n\ncreate policy \"Anyone can upload an avatar.\" on storage.objects for insert\nwith\n  check (bucket_id = 'avatars');\n```\n\n## License\n\n[MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatanaelvich%2Fapp-auth-supabase-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatanaelvich%2Fapp-auth-supabase-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatanaelvich%2Fapp-auth-supabase-example/lists"}