{"id":25536606,"url":"https://github.com/tienan92it/nextjs-auth","last_synced_at":"2026-04-13T08:31:01.948Z","repository":{"id":96856233,"uuid":"137708379","full_name":"tienan92it/nextjs-auth","owner":"tienan92it","description":"This is a custom from nextauth","archived":false,"fork":false,"pushed_at":"2018-06-18T04:41:47.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T21:43:58.838Z","etag":null,"topics":["authentication","nextjs"],"latest_commit_sha":null,"homepage":"https://github.com/iaincollins/next-auth","language":"JavaScript","has_issues":true,"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/tienan92it.png","metadata":{"files":{"readme":"README-CLIENT.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2018-06-18T04:03:21.000Z","updated_at":"2023-05-22T10:56:04.000Z","dependencies_parsed_at":"2023-04-18T20:17:16.014Z","dependency_job_id":null,"html_url":"https://github.com/tienan92it/nextjs-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tienan92it/nextjs-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienan92it%2Fnextjs-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienan92it%2Fnextjs-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienan92it%2Fnextjs-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienan92it%2Fnextjs-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tienan92it","download_url":"https://codeload.github.com/tienan92it/nextjs-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienan92it%2Fnextjs-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","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":["authentication","nextjs"],"created_at":"2025-02-20T04:36:43.531Z","updated_at":"2026-04-13T08:31:01.936Z","avatar_url":"https://github.com/tienan92it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextAuthClient\n\n## About NextAuthClient\n\nNextAuthClient is session library for the [next-auth](https://www.npmjs.com/package/next-auth) module.\n\n## Methods\n\nIt provides the following methods, all of which return a promise.\n\n### NextAuthClient.init({ req, force })\n\nIsometric (can be used in server side rendering when passed optional `req` object).\n\nReturn the current session.\n\nWhen using Server Side Rendering and passed `req` object from **getInitialProps({req})** it will read the data from it.\n\nWhen using Client Side Rendering it will use localStorage (if avalible) to check for cached session data and if not found or expired it call the `/auth/session` end point.\n\n### NextAuthClient.signin(string or object)\n\nClient side only method.\n\nIf passed a string treats it as an email address, generates an email sign in token and makes POST request to `/auth/email/signin`.\n\nIf passed an object treats it as a form to be handled by a custom signIn() function and makes a POST request to `/auth/signin`.\n\n### NextAuthClient.signout()\n\nClient side only method. Triggers the current session to be destroyed.\n\nMakes POST request to `/auth/signout`.\n\n### NextAuthClient.csrfToken()\n\nClient side only method. Returns the latest CSRF Token.\n\nNote: When rendering server side, this is accessible from NextAuthClient.init().\n\nMakes GET request to `/auth/csrf`.\n\n### NextAuthClient.linked({ req })\n\nIsometric method (can be used in server side rendering when passed optional `req` object).\n\nReturns a list of linked/unlinked oAuth providers.\n\nThis is useful on account management pages where you want to display buttons to link / unlink accounts.\n\nMakes GET request to `/auth/linked`.\n\n### NextAuthClient.providers({ req })\n\nIsometric method (can be used in server side rendering when passed optional `req` object).\n\nReturns a list of all configured oAuth providers.\n\nIt includes their names, sign in URLs and callback URLs.\n\nThis is useful on sign in pages (e.g. to render sign in links for all configured providers).\n\nMakes GET request to `/auth/providers`.\n\n## Example\n\n````javascript\nimport React from 'react'\nimport { NextAuth } from 'next-auth/client'\n\nexport default class extends React.Component {\n  static async getInitialProps({req}) {\n    return {\n      session: await NextAuth.init({req})\n    }\n  }\n  render() {\n    if (this.props.session.user) {\n      return(\n        \u003cdiv\u003e\n          \u003cp\u003eYou are logged in as {this.props.session.user.name || this.props.session.user.email}.\u003c/p\u003e\n        \u003c/div\u003e\n        )\n    } else {\n      return(\n        \u003cdiv\u003e\n          \u003cp\u003eYou are not logged in.\u003c/p\u003e\n        \u003c/div\u003e\n      )\n    }\n  }\n}\n````\n\nSee [next-auth](https://www.npmjs.com/package/next-auth) for more information or [nextjs-starter](https://nextjs-starter.now.sh) for a working demo.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftienan92it%2Fnextjs-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftienan92it%2Fnextjs-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftienan92it%2Fnextjs-auth/lists"}