{"id":18897018,"url":"https://github.com/scale3-labs/zklogin-demo","last_synced_at":"2026-03-05T10:01:47.548Z","repository":{"id":198555056,"uuid":"701042399","full_name":"Scale3-Labs/zklogin-demo","owner":"Scale3-Labs","description":"A demo application to showcase zkLogin authentication.","archived":false,"fork":false,"pushed_at":"2023-11-21T00:02:08.000Z","size":371,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T08:42:32.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zklogin.scale3labs.com/","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/Scale3-Labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T19:43:55.000Z","updated_at":"2024-12-16T04:33:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"15fe6f45-620a-4fe2-8b83-580d2556520c","html_url":"https://github.com/Scale3-Labs/zklogin-demo","commit_stats":null,"previous_names":["scale3-labs/zklogin-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Scale3-Labs/zklogin-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fzklogin-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fzklogin-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fzklogin-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fzklogin-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scale3-Labs","download_url":"https://codeload.github.com/Scale3-Labs/zklogin-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scale3-Labs%2Fzklogin-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30118932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T09:35:22.236Z","status":"ssl_error","status_checked_at":"2026-03-05T09:35:20.028Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-08T08:36:02.398Z","updated_at":"2026-03-05T10:01:47.503Z","avatar_url":"https://github.com/Scale3-Labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUI zkLogin Integration with Next.js using NextAuth\n\nThis demo application demonstrates the integration of SUI zkLogin using NextAuth in a Next.js framework. Users can log in with their Gmail accounts and generate a persistent SUI address that remains unchanged as long as the same Gmail account is used for logging in.\n\nFor detailed information:\n- [SUI zkLogin](https://docs.sui.io/testnet/build/zk_login#google)\n- [Scale3Labs](https://scale3labs.com/)\n\n## Setup Instructions\n\n### 1. Google OAuth Credentials\n\nTo begin, you'll need to create Google OAuth credentials that will provide you with a `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`.\n\n- Visit the [Google Cloud Platform Console](https://console.cloud.google.com/).\n- Create or select an existing project.\n- Access the **OAuth consent screen** and provide the necessary details.\n- Navigate to **Credentials** and click on **Create Credentials**. Choose **OAuth 2.0 Client ID**.\n- Define the application type as \"Web application\", specify a name, and under \"Authorized redirect URIs\", append your application's callback URL (usually `http://localhost:3000/api/auth/callback/google` for local development).\n- Press \"Create\" and take note of your `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`.\n\n### 2. Master Seed Generation\n\nCreate a master seed and ensure it's stored securely. This is instrumental for user salt creation. Use the following environment variable:\n\n```env\nMASTER_SEED=your_master_seed_here\n```\n\n### 3. NextAuth Environment Variables\n\nConfigure the necessary environment variables for NextAuth:\n\n```env\nNEXT_PUBLIC_ENVIRONMENT=development\nNEXT_PUBLIC_HOST=http://localhost:3000\nNEXTAUTH_URL=http://localhost:3000\nNEXTAUTH_URL_INTERNAL=http://localhost:3000\nNEXTAUTH_SECRET=testsecret \n```\n\n### 4. Database Configuration\nThis repository employs the Prisma adapter with a PostgreSQL database to maintain user account details. If you're deploying on Vercel, you can readily create a PostgreSQL database for this purpose. Once your database is operational, adjust the following environment variables:\n\n```env\nPOSTGRES_DATABASE=\"verceldb\"\nPOSTGRES_HOST=\"your_host_here\"\nPOSTGRES_USER=\"your_username_here\"\nPOSTGRES_PASSWORD=\"your_password_here\"\nPOSTGRES_PRISMA_URL=\"your_prisma_url_here\"\nPOSTGRES_URL=\"your_postgres_url_here\"\nPOSTGRES_URL_NON_POOLING=\"your_non_pooling_url_here\"\n```\n\nFill in the placeholders with your specific credentials.\n\n### 5. Running the Application\nExecute the commands below to boot the server:\n\n```\nnpm i\nnpm run dev\n```\n\nThis repository has been structured to generate salt in compliance with the guidelines provided in the SUI zkLogin documentation. The current configuration uses the testnet, but this can be adjusted within sui.ts.\n\n### What's Coming?\nIntegration for obtaining zk proofs and facilitating transactions.\n\nContributions are encouraged! If you'd like to propose improvements, feel free to open a PR. For queries, either raise an issue or contact us directly at contact@scale3labs.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscale3-labs%2Fzklogin-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscale3-labs%2Fzklogin-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscale3-labs%2Fzklogin-demo/lists"}