{"id":15601192,"url":"https://github.com/hacknlove/storybook-addon-next-auth0","last_synced_at":"2026-06-13T19:34:24.372Z","repository":{"id":77996251,"uuid":"393285542","full_name":"hacknlove/storybook-addon-next-auth0","owner":"hacknlove","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-08T10:41:10.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T07:34:21.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hacknlove.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2021-08-06T06:58:32.000Z","updated_at":"2021-08-08T10:41:12.000Z","dependencies_parsed_at":"2023-03-12T03:10:11.256Z","dependency_job_id":null,"html_url":"https://github.com/hacknlove/storybook-addon-next-auth0","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":0.4444444444444444,"last_synced_commit":"a0a3b9a10b39c3f09ebe7fb5e29951f377b99a66"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"storybookjs/addon-kit","purl":"pkg:github/hacknlove/storybook-addon-next-auth0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fstorybook-addon-next-auth0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fstorybook-addon-next-auth0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fstorybook-addon-next-auth0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fstorybook-addon-next-auth0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacknlove","download_url":"https://codeload.github.com/hacknlove/storybook-addon-next-auth0/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fstorybook-addon-next-auth0/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34298247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-03T02:19:35.597Z","updated_at":"2026-06-13T19:34:24.354Z","avatar_url":"https://github.com/hacknlove.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# storybook-addon-next-auth0\n\nAllows you to use [`useUser`](https://auth0.github.io/nextjs-auth0/modules/frontend_use_user.html) from [`@auth0/nextjs-auth0`](https://github.com/auth0/nextjs-auth0)\n\nIt decores your stories with a mocked [`UserProvider`](https://auth0.github.io/nextjs-auth0/modules/frontend_use_user.html#userprovider) that you can control on a storybook panel.\n\n![screencap](./assets/screencap.png)\n\n## Install\n\n```\nnpm i -d storybook-addon-next-auth0\n```\n\n## configuration\n\nadd \"storybook-addon-next-auth0\" to you `.storybook/main.js` addons\n\nThat's all.\n\n### example\n```js\nmodule.exports = {\nconst path = require(\"path\");\n\nmodule.exports = {\n  \"stories\": [\n    \"../components/**/*.stories.@(js|jsx)\",\n    \"../pageStories/**/*.stories.@(js|jsx)\",\n  ],\n  \"addons\": [\n    'storybook-addon-next-auth0',\n    \"@storybook/addon-links\",\n    \"@storybook/addon-essentials\",\n  ],\n}\n```\n## Stories\n\nYou can pass the initial useUser value to any story though story's parameters\n\n### example\n[stories/Example.stories.js](stories/Example.stories.js)\n\n\n```js\nimport React from \"react\";\nimport { UserPrint } from \"./Example\";\n\nexport default {\n  title: \"Example/User\",\n  component: UserPrint,\n  parameters: {\n    initialUser: {\n      isLoading: true,\n    }\n  }\n};\n\nexport const Loading = () =\u003e \u003cUserPrint /\u003e\n\nexport const Logged = () =\u003e \u003cUserPrint /\u003e\nLogged.parameters = {\n  initialUser: {\n    isLoading: false,\n    user: {\n      email: 'john@doe.com',\n      email_verified: true,\n      nickname: 'Joe',\n      picture: 'https://picsum.photos/200',\n      sub: 'mock:johndoe',\n      updated_at: '2021-04-02T12:42:42.042Z',\n    }\n  }\n}\n\nexport const ErrorStory = () =\u003e \u003cUserPrint /\u003e\nErrorStory.parameters = {\n  initialUser: {\n    isLoading: false,\n    error: 'Something went wrong'\n  }\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fstorybook-addon-next-auth0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacknlove%2Fstorybook-addon-next-auth0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fstorybook-addon-next-auth0/lists"}