{"id":13402320,"url":"https://github.com/nextauthjs/next-auth-gatsby-example","last_synced_at":"2025-04-07T02:35:14.958Z","repository":{"id":38684319,"uuid":"455860689","full_name":"nextauthjs/next-auth-gatsby-example","owner":"nextauthjs","description":"Example showing how to use NextAuth.js with Gatsby","archived":false,"fork":false,"pushed_at":"2024-05-15T17:45:45.000Z","size":116,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-31T19:35:23.561Z","etag":null,"topics":["authentication","gatsby","oauth","passwordless"],"latest_commit_sha":null,"homepage":"https://next-auth-gatsby-example.vercel.app","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextauthjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nextauth","github":["balazsorban44","ThangHuuVu"]}},"created_at":"2022-02-05T12:14:21.000Z","updated_at":"2024-05-15T17:45:48.000Z","dependencies_parsed_at":"2024-10-25T22:27:43.273Z","dependency_job_id":"621f8a36-a33d-4316-b9d4-246940479756","html_url":"https://github.com/nextauthjs/next-auth-gatsby-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextauthjs%2Fnext-auth-gatsby-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextauthjs%2Fnext-auth-gatsby-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextauthjs%2Fnext-auth-gatsby-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextauthjs%2Fnext-auth-gatsby-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextauthjs","download_url":"https://codeload.github.com/nextauthjs/next-auth-gatsby-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247583690,"owners_count":20962065,"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":["authentication","gatsby","oauth","passwordless"],"created_at":"2024-07-30T19:01:14.466Z","updated_at":"2025-04-07T02:35:09.948Z","avatar_url":"https://github.com/nextauthjs.png","language":"JavaScript","readme":"\u003e The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/playground-gatsby). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).\n\n\u003cp align=\"center\"\u003e\n   \u003cbr/\u003e\n   \u003ca href=\"https://authjs.dev\" target=\"_blank\"\u003e\u003cimg width=\"150px\" src=\"https://authjs.dev/img/logo-sm.png\" /\u003e\u003c/a\u003e\n   \u003ch3 align=\"center\"\u003eAuth.js Example App\u003c/h3\u003e\n   \u003cp align=\"center\"\u003e\n   Open Source. Full Stack. Own Your Data.\n   \u003c/p\u003e\n   \u003cp align=\"center\" style=\"align: center;\"\u003e\n      \u003ca href=\"https://npm.im/next-auth\"\u003e\n        \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@auth/core?color=green\u0026label=@auth/core\u0026style=flat-square\"\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://bundlephobia.com/result?p=@auth/core\"\u003e\n        \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/@auth/core?label=bundle\u0026style=flat-square\" alt=\"Bundle Size\"/\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://www.npmtrends.com/@auth/core\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/dm/@auth/core?label=downloads\u0026style=flat-square\" alt=\"Downloads\" /\u003e\n      \u003c/a\u003e\n   \u003c/p\u003e\n\u003c/p\u003e\n\n## Overview\n\nAuth.js is a complete open-source authentication solution.\n\nThis is an example application that shows how `@auth/core` is applied to a basic Gatsby app. We are showing how to configure the backend both as a [Vercel Function](https://vercel.com/docs/concepts/functions/introduction) for deployment to Vercel, and also for [Gatsby Functions](https://www.gatsbyjs.com/docs/reference/functions) for other platforms.\n\nThe deployed version can be found at [`next-auth-gatsby-example.vercel.app`](https://next-auth-gatsby-example.vercel.app)\n\n### About Auth.js\n\nAuth.js is an easy-to-implement, full-stack (client/server) open-source authentication library originally designed for [Next.js](https://nextjs.org) and [Serverless](https://vercel.com), but this example shows how to use it in a Gatsby project. Our goal is to [support even more frameworks](https://github.com/nextauthjs/next-auth/issues/2294) in the future.\n\nGo to [authjs.dev](https://authjs.dev) for more information and documentation.\n\n\u003e Auth.js is not officially associated with Vercel or Next.js.\\_\n\n## Getting Started\n\n### 1. Clone the repository and install dependencies\n\n```\ngit clone https://github.com/nextauthjs/next-auth-gatsby-example.git\ncd next-auth-gatsby-example\nnpm install\n```\n\n### 2. Configure your local environment\n\nCopy the .env.local.example file in this directory to .env.local (which will be ignored by Git):\n\n```\ncp .env.local.example .env.local\n```\n\nAdd details for one or more providers (e.g. Google, Twitter, GitHub, Email, etc).\n\n#### Database\n\nA database is needed to persist user accounts and to support email sign in. However, you can still use Auth.js for authentication without a database by using OAuth for authentication. If you do not specify a database, [JSON Web Tokens](https://jwt.io/introduction) will be enabled by default.\n\nYou **can** skip configuring a database and come back to it later if you want.\n\nFor more information about setting up a database, please check out the following links:\n\n- Docs: [authjs.dev/reference/core/adapters](https://authjs.dev/reference/core/adapters)\n\n### 3. Configure Authentication Providers\n\n1. Review and update options in `nextauth.config.js` as needed.\n\n2. When setting up OAuth, in the developer admin page for each of your OAuth services, you should configure the callback URL to use a callback path of `{server}/api/auth/callback/{provider}`.\n\ne.g. For Google OAuth you would use: `http://localhost:3000/api/auth/callback/google`\n\nA list of configured providers and their callback URLs is available from the endpoint `/api/auth/providers`. You can find more information at [authjs.dev/reference/core/providers](https://authjs.dev/reference/core/providers).\n\n3. You can also choose to specify an SMTP server for passwordless sign in via email.\n\n### 4. Start the application\n\nTo run your site locally, use:\n\n```\nnpm run dev\n```\n\nTo run it in production mode, use:\n\n```\nnpm run build\nnpm run start\n```\n\n### 5. Preparing for Production\n\nFollow the [Deployment documentation](https://authjs.dev/getting-started/deployment)\n\n## Acknowledgements\n\n\u003ca href=\"https://vercel.com?utm_source=authjs\u0026utm_campaign=oss\"\u003e\n\u003cimg width=\"170px\" src=\"https://raw.githubusercontent.com/nextauthjs/next-auth/main/docs/public/img/etc/powered-by-vercel.svg\" alt=\"Powered By Vercel\" /\u003e\n\u003c/a\u003e\n\u003cp align=\"left\"\u003eThanks to Vercel sponsoring this project by allowing it to be deployed for free for the entire Auth.js Team\u003c/p\u003e\n\n## License\n\nISC\n","funding_links":["https://opencollective.com/nextauth","https://github.com/sponsors/balazsorban44","https://github.com/sponsors/ThangHuuVu"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextauthjs%2Fnext-auth-gatsby-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextauthjs%2Fnext-auth-gatsby-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextauthjs%2Fnext-auth-gatsby-example/lists"}