{"id":20704392,"url":"https://github.com/nabind47/authjs","last_synced_at":"2025-04-23T01:24:49.490Z","repository":{"id":219417535,"uuid":"737521356","full_name":"nabind47/authjs","owner":"nabind47","description":"Authentication in Next.js 14 with Auth.js and server actions having credentials as well as socials signin along with forgot password and 2FA.","archived":false,"fork":false,"pushed_at":"2024-07-22T16:40:06.000Z","size":2062,"stargazers_count":45,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T20:51:09.295Z","etag":null,"topics":["authjs","nextjs14","prisma","shadcn-ui"],"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/nabind47.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-12-31T11:11:59.000Z","updated_at":"2025-03-25T03:11:43.000Z","dependencies_parsed_at":"2024-11-17T01:12:12.134Z","dependency_job_id":"dfea3ba3-c570-42a5-9018-b8fabd588c34","html_url":"https://github.com/nabind47/authjs","commit_stats":null,"previous_names":["nabind47/authjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabind47%2Fauthjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabind47%2Fauthjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabind47%2Fauthjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabind47%2Fauthjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabind47","download_url":"https://codeload.github.com/nabind47/authjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250350241,"owners_count":21416098,"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":["authjs","nextjs14","prisma","shadcn-ui"],"created_at":"2024-11-17T01:12:07.056Z","updated_at":"2025-04-23T01:24:49.461Z","avatar_url":"https://github.com/nabind47.png","language":"TypeScript","readme":"# [Authjs](https://authjs.dev/)\n\n![login](public/login.png)\n![admin](public/admin.png)\n![settings](public/settings.png)\n\n\u003e [Edge compatibility](https://authjs.dev/guides/upgrade-to-v5?authentication-method=middleware)\n\u003e while `NextAuth.js` strictly uses standard Web APIs (and thus can run in any environments that supports that), some `libraries/ORM` packages that you rely on might not be ready yet. In this case, you can split the auth configuration into multiple files.\n\n\u003e [Upgrading V5](https://authjs.dev/guides/upgrade-to-v5?authentication-method=middleware#new-features)\n\n## [Callbacks](https://authjs.dev/guides/basics/callbacks#:~:text=Callbacks%201%20Sign%20in%20callback%20Use%20the%20signIn,3%20JWT%20callback%20...%204%20Session%20callback%20)\n\nCallbacks are asynchronous functions you can use to control what happens when an action is performed. Callbacks are extremely powerful, especially in scenarios involving JSON Web Tokens as they allow you to implement access controls without a database and to integrate with external databases or APIs.\n\n```ts\n  callbacks: {\n    async signIn({ user, account, profile, email, credentials }) {\n      return true\n    },\n    async redirect({ url, baseUrl }) {\n      return baseUrl\n    },\n    async session({ session, user, token }) {\n      return session\n    },\n    async jwt({ token, user, account, profile, isNewUser }) {\n      return token\n    }\n  }\n```\n\n\u003e If you want to pass data such as an Access Token or User ID to the browser when using JSON Web Tokens, you can persist the data in the token when the jwt callback is called, then pass the data through to the browser in the session callback\n","funding_links":[],"categories":["\u003ca name=\"TypeScript\"\u003e\u003c/a\u003eTypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabind47%2Fauthjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabind47%2Fauthjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabind47%2Fauthjs/lists"}