{"id":18321080,"url":"https://github.com/workos/next-authkit-example","last_synced_at":"2025-04-06T11:09:37.476Z","repository":{"id":196567494,"uuid":"692030043","full_name":"workos/next-authkit-example","owner":"workos","description":"Example application demonstrating how to authenticate users with AuthKit and the WorkOS Node SDK.","archived":false,"fork":false,"pushed_at":"2025-03-23T05:38:55.000Z","size":324,"stargazers_count":76,"open_issues_count":9,"forks_count":19,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T10:07:35.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-15T12:09:50.000Z","updated_at":"2025-03-23T05:38:18.000Z","dependencies_parsed_at":"2023-12-01T12:04:46.720Z","dependency_job_id":"e688f2ef-d1de-4bf8-9c62-53187e0c66ca","html_url":"https://github.com/workos/next-authkit-example","commit_stats":null,"previous_names":["workos/next-authkit-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-authkit-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-authkit-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-authkit-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-authkit-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workos","download_url":"https://codeload.github.com/workos/next-authkit-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471521,"owners_count":20944158,"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","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-05T18:18:17.352Z","updated_at":"2025-04-06T11:09:37.444Z","avatar_url":"https://github.com/workos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js integration example using AuthKit\n\nAn example application demonstrating how to authenticate users with AuthKit and the WorkOS Node SDK.\n\n\u003e Refer to the [User Management](https://workos.com/docs/user-management) documentation for reference.\n\n## Prerequisites\n\nYou will need a [WorkOS account](https://dashboard.workos.com/signup).\n\n## Running the example\n\n1. In the [WorkOS dashboard](https://dashboard.workos.com), head to the Redirects tab and create a [sign-in callback redirect](https://workos.com/docs/user-management/1-configure-your-project/configure-a-redirect-uri) for `http://localhost:3000/callback` and set the app homepage URL to `http://localhost:3000`.\n\n2. After creating the redirect URI, navigate to the API keys tab and copy the _Client ID_ and the _Secret Key_. Rename the `.env.local.example` file to `.env.local` and supply your Client ID and API key as environment variables.\n\n3. Additionally, create a cookie password as the private key used to encrypt the session cookie. Copy the output into the environment variable `WORKOS_COOKIE_PASSWORD`.\n\n   It has to be at least 32 characters long. You can use https://1password.com/password-generator/ to generate strong passwords.\n\n4. Verify your `.env.local` file has the following variables filled.\n\n   ```bash\n   WORKOS_CLIENT_ID=\u003cYOUR_CLIENT_ID\u003e\n   WORKOS_API_KEY=\u003cYOUR_API_SECRET_KEY\u003e\n   WORKOS_COOKIE_PASSWORD=\u003cYOUR_COOKIE_PASSWORD\u003e\n\n   NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/callback\n   ```\n\n5. Run the following command and navigate to [http://localhost:3000](http://localhost:3000).\n\n   ```bash\n   npm run dev\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fnext-authkit-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkos%2Fnext-authkit-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fnext-authkit-example/lists"}