├── .bundlewatch.config.json
├── .editorconfig
├── .eslintignore
├── .eslintrc.cjs
├── .github
├── renovate.json
└── workflows
│ ├── codeql-analysis.yml
│ ├── on-pull-request.yml
│ ├── on-push.yml
│ └── on-release.yml
├── .gitignore
├── .prettierignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── assets
└── logo.jpg
├── docs
├── README.md
├── functions
│ ├── AuthProvider.md
│ ├── useAuth.md
│ └── withAuth.md
├── interfaces
│ ├── AuthContextProps.md
│ ├── AuthProviderProps.md
│ ├── AuthProviderSignOutProps.md
│ └── Location.md
└── variables
│ └── AuthContext.md
├── guides
├── HOOKS.md
├── QUICKSTART.md
├── WITHAUTH.md
└── migrate-v1-v2.md
├── package.json
├── pnpm-lock.yaml
├── src
├── __tests__
│ └── auth-context.test.tsx
├── auth-context-interface.ts
├── auth-context.tsx
├── index.ts
├── use-auth.ts
└── with-auth.tsx
├── tsconfig.json
├── tsconfig.release.json
└── typedoc.json
/.bundlewatch.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | {
4 | "path": "./build/src/*.js"
5 | }
6 | ],
7 | "ci": {
8 | "trackBranches": ["main"]
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | charset = utf-8
7 | trim_trailing_whitespace = false
8 | insert_final_newline = false
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | /**/*.js
2 | build/
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | /**
2 | * @type {import('eslint').Linter.Config}
3 | **/
4 |
5 | module.exports = {
6 | extends: [
7 | '@bjerk/eslint-config/base',
8 | '@bjerk/eslint-config/typescript',
9 | // '@bjerk/eslint-config/import',
10 | // '@bjerk/eslint-config/prettier',
11 | ],
12 | overrides: [
13 | {
14 | files: ['*.test.ts', '*.test.tsx'],
15 | rules: {
16 | // TODO: Improve tests and remove these rules
17 | '@typescript-eslint/no-unsafe-assignment': 'warn',
18 | '@typescript-eslint/no-unsafe-member-access': 'warn',
19 | '@typescript-eslint/no-explicit-any': 'warn',
20 | '@typescript-eslint/no-unsafe-argument': 'warn',
21 | '@typescript-eslint/no-floating-promises': 'warn',
22 | 'no-restricted-globals': 'warn',
23 | '@typescript-eslint/no-unsafe-call': 'warn',
24 | },
25 | },
26 | ],
27 | parserOptions: {
28 | project: true,
29 | tsconfigRootDir: __dirname,
30 | },
31 | };
32 |
--------------------------------------------------------------------------------
/.github/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": ["github>bjerkio/workflows"],
4 |
5 | "packageRules": [
6 | {
7 | "matchDatasources": ["npm"],
8 | "matchPackageNames": [
9 | "react",
10 | "react-dom",
11 | "@types/react",
12 | "@types/react-dom"
13 | ],
14 | "matchUpdateTypes": ["major"],
15 | "groupName": "React major dependency updates",
16 | "groupSlug": "react-major-deps"
17 | },
18 | {
19 | "matchPackageNames": ["oidc-client-ts"],
20 | "matchUpdateTypes": ["minor", "patch", "major"],
21 | "groupName": "oidc-client-ts dependency update",
22 | "groupSlug": "oidc-client-ts-dep",
23 | "semanticCommitScope": "deps"
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | name: 'CodeQL'
7 |
8 | on:
9 | push:
10 | branches: [master]
11 | pull_request:
12 | # The branches below must be a subset of the branches above
13 | branches: [master]
14 | schedule:
15 | - cron: '0 12 * * 0'
16 |
17 | jobs:
18 | analyze:
19 | name: Analyze
20 | runs-on: ubuntu-latest
21 |
22 | strategy:
23 | fail-fast: false
24 | matrix:
25 | # Override automatic language detection by changing the below list
26 | # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27 | language: ['javascript']
28 | # Learn more...
29 | # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
30 |
31 | steps:
32 | - name: Checkout repository
33 | uses: actions/checkout@v4
34 | with:
35 | # We must fetch at least the immediate parents so that if this is
36 | # a pull request then we can checkout the head.
37 | fetch-depth: 2
38 |
39 | # If this run was triggered by a pull request event, then checkout
40 | # the head of the pull request instead of the merge commit.
41 | - run: git checkout HEAD^2
42 | if: ${{ github.event_name == 'pull_request' }}
43 |
44 | # Initializes the CodeQL tools for scanning.
45 | - name: Initialize CodeQL
46 | uses: github/codeql-action/init@v3
47 | with:
48 | languages: ${{ matrix.language }}
49 | # If you wish to specify custom queries, you can do so here or in a config file.
50 | # By default, queries listed here will override any specified in a config file.
51 | # Prefix the list here with "+" to use these queries and those in the config file.
52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
53 |
54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55 | # If this step fails, then you should remove it and run the build manually (see below)
56 | - name: Autobuild
57 | uses: github/codeql-action/autobuild@v3
58 |
59 | # ℹ️ Command-line programs to run using the OS shell.
60 | # 📚 https://git.io/JvXDl
61 |
62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63 | # and modify them (or add more) to build your code if your project
64 | # uses a compiled language
65 |
66 | #- run: |
67 | # make bootstrap
68 | # make release
69 |
70 | - name: Perform CodeQL Analysis
71 | uses: github/codeql-action/analyze@v3
72 |
--------------------------------------------------------------------------------
/.github/workflows/on-pull-request.yml:
--------------------------------------------------------------------------------
1 | name: On PR
2 | on: [pull_request]
3 |
4 | jobs:
5 | build:
6 | runs-on: ubuntu-latest
7 |
8 | strategy:
9 | fail-fast: false
10 | matrix:
11 | node-version: [lts/-2, lts/-1, lts/*, current]
12 |
13 | steps:
14 | - uses: actions/checkout@v4
15 |
16 | - name: Setup pnpm 📦️
17 | uses: pnpm/action-setup@v2
18 |
19 | - name: Use Node.js ${{ matrix.node-version }}
20 | uses: actions/setup-node@v4
21 | with:
22 | node-version: ${{ matrix.node-version }}
23 | cache: pnpm
24 |
25 | - run: node --version
26 |
27 | - run: pnpm install --frozen-lockfile
28 |
29 | # - run: pnpm run lint # Temporarily removed on 2024-12-09
30 |
31 | - run: pnpm run test
32 |
33 | - run: pnpm run build
34 |
35 | - run: pnpm run format:check
36 |
37 | - uses: codecov/codecov-action@v4
38 |
--------------------------------------------------------------------------------
/.github/workflows/on-push.yml:
--------------------------------------------------------------------------------
1 | name: On Push
2 | on:
3 | push:
4 | branches:
5 | - main
6 | - master
7 |
8 | jobs:
9 | build-and-test:
10 | runs-on: ubuntu-latest
11 |
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | node-version: [lts/-2, lts/-1, lts/*, current]
16 |
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - name: Setup pnpm 📦️
21 | uses: pnpm/action-setup@v2
22 |
23 | - name: Use Node.js ${{ matrix.node-version }}
24 | uses: actions/setup-node@v4
25 | with:
26 | node-version: ${{ matrix.node-version }}
27 | cache: pnpm
28 |
29 | - run: node --version
30 |
31 | - run: pnpm install --frozen-lockfile
32 |
33 | - run: pnpm run test
34 |
35 | - run: pnpm run build
36 |
37 | - uses: codecov/codecov-action@v4
38 |
39 | generate-docs:
40 | runs-on: ubuntu-latest
41 | steps:
42 | - uses: actions/checkout@v4
43 |
44 | - name: Setup pnpm 📦️
45 | uses: pnpm/action-setup@v2
46 |
47 | - name: Use Node.js LTS
48 | uses: actions/setup-node@v4
49 | with:
50 | node-version: lts/*
51 | cache: pnpm
52 |
53 | - run: pnpm install --frozen-lockfile
54 |
55 | - name: Run typegen
56 | run: pnpm run generate-docs
57 |
58 | - name: Create Pull Request
59 | uses: peter-evans/create-pull-request@v7
60 | with:
61 | branch: update-documentation
62 | delete-branch: true
63 | commit-message: 'chore(docs): run typegen'
64 | title: 'chore(docs): run typegen'
65 | body:
66 | 'This is automatically created since the documentation is out of
67 | date.'
68 |
--------------------------------------------------------------------------------
/.github/workflows/on-release.yml:
--------------------------------------------------------------------------------
1 | name: Release to NPM
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | release:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout 🛎️
12 | uses: actions/checkout@v4
13 |
14 | - uses: pnpm/action-setup@v2
15 |
16 | - name: Use Node LTS ✨
17 | uses: actions/setup-node@v4
18 | with:
19 | node-version: lts/*
20 | registry-url: https://registry.npmjs.org
21 | cache: pnpm
22 |
23 | - name: Install dependencies 📦️
24 | run: pnpm install --frozen-lockfile
25 |
26 | - name: Build 🔨
27 | run: pnpm build
28 |
29 | - uses: simenandre/publish-with-pnpm@v2
30 | with:
31 | npm-auth-token: ${{ secrets.NPM_TOKEN }}
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 | *.pid.lock
11 |
12 | # Directory for instrumented libs generated by jscoverage/JSCover
13 | lib-cov
14 |
15 | # Intellij
16 | .idea
17 | *.iml
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # dotenv environment variables file
57 | .env
58 |
59 | # next.js build output
60 | .next
61 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
62 |
63 | # dependencies
64 | /node_modules
65 | /.pnp
66 | .pnp.js
67 |
68 | # testing
69 | /coverage
70 |
71 | # production
72 | /build
73 |
74 | # misc
75 | .DS_Store
76 | .env.local
77 | .env.development.local
78 | .env.test.local
79 | .env.production.local
80 |
81 | npm-debug.log*
82 | package-lock.json
83 | pnpm-debug.log*
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | CHANGELOG.md
2 | docs/*
3 | dist/*
4 | build/*
5 |
6 | # Logs
7 | logs
8 | *.log
9 | npm-debug.log*
10 | lerna-debug.log*
11 |
12 | # Diagnostic reports (https://nodejs.org/api/report.html)
13 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14 |
15 | # Runtime data
16 | pids
17 | *.pid
18 | *.seed
19 | *.pid.lock
20 |
21 | # Directory for instrumented libs generated by jscoverage/JSCover
22 | lib-cov
23 |
24 | # Coverage directory used by tools like istanbul
25 | coverage
26 | *.lcov
27 |
28 | # nyc test coverage
29 | .nyc_output
30 |
31 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32 | .grunt
33 |
34 | # Bower dependency directory (https://bower.io/)
35 | bower_components
36 |
37 | # node-waf configuration
38 | .lock-wscript
39 |
40 | # Compiled binary addons (https://nodejs.org/api/addons.html)
41 | build/Release
42 |
43 | # Dependency directories
44 | node_modules/
45 | jspm_packages/
46 |
47 | # TypeScript v1 declaration files
48 | typings/
49 |
50 | # TypeScript cache
51 | *.tsbuildinfo
52 |
53 | # Optional npm cache directory
54 | .npm
55 |
56 | # Optional eslint cache
57 | .eslintcache
58 |
59 | # Microbundle cache
60 | .rpt2_cache/
61 | .rts2_cache_cjs/
62 | .rts2_cache_es/
63 | .rts2_cache_umd/
64 |
65 | # Optional REPL history
66 | .node_repl_history
67 |
68 | # Output of 'npm pack'
69 | *.tgz
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.test
74 |
75 | # parcel-bundler cache (https://parceljs.org/)
76 | .cache
77 |
78 | # Next.js build output
79 | .next
80 |
81 | # Nuxt.js build / generate output
82 | .nuxt
83 | dist
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # vuepress build output
92 | .vuepress/dist
93 |
94 | # Serverless directories
95 | .serverless/
96 |
97 | # FuseBox cache
98 | .fusebox/
99 |
100 | # DynamoDB Local files
101 | .dynamodb/
102 |
103 | # TernJS port file
104 | .tern-port
105 |
106 | # GitHub Actions
107 | .github/renovate.json
108 | pnpm-lock.yaml
109 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file. See
4 | [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5 |
6 | ## [3.2.2](https://github.com/bjerkio/oidc-react/compare/v3.2.1...v3.2.2) (2023-06-20)
7 |
8 |
9 | ### Bug Fixes
10 |
11 | * multiplied code exchange requests in strict mode ([#1012](https://github.com/bjerkio/oidc-react/issues/1012)) ([2118bb2](https://github.com/bjerkio/oidc-react/commit/2118bb24fae875669a3bc87fcec298092485838d))
12 |
13 | ## [3.2.1](https://github.com/bjerkio/oidc-react/compare/v3.2.0...v3.2.1) (2023-06-12)
14 |
15 |
16 | ### Bug Fixes
17 |
18 | * **deps:** update dependency oidc-client-ts to v2.2.4 ([#1006](https://github.com/bjerkio/oidc-react/issues/1006)) ([423be19](https://github.com/bjerkio/oidc-react/commit/423be19c9a09ea43e53931d7eeaab6972651eb32))
19 |
20 | ## [3.2.0](https://github.com/bjerkio/oidc-react/compare/v3.1.0...v3.2.0) (2023-05-02)
21 |
22 |
23 | ### Features
24 |
25 | * add inline source maps ([efdf184](https://github.com/bjerkio/oidc-react/commit/efdf184bd585a3b7d2c8ad59cac03e83c27133c4))
26 |
27 | ## [3.1.0](https://github.com/bjerkio/oidc-react/compare/v3.0.4...v3.1.0) (2023-04-21)
28 |
29 |
30 | ### Features
31 |
32 | * add `metadata` parameter to AuthContext ([1e6703b](https://github.com/bjerkio/oidc-react/commit/1e6703b11a8eda0ced7e76cd9e8a27b5abb902f9))
33 |
34 | ## [3.0.4](https://github.com/bjerkio/oidc-react/compare/oidc-react-v3.0.4...oidc-react-v3.0.4) (2023-04-10)
35 |
36 |
37 | ### Bug Fixes
38 |
39 | * isLoading has correct status when autoSignIn is disabled and user is signed out ([#982](https://github.com/bjerkio/oidc-react/issues/982)) ([db28cdd](https://github.com/bjerkio/oidc-react/commit/db28cdd6a6368d8d07f01f1827d77afd18d70bf1))
40 |
41 |
42 | ### Miscellaneous Chores
43 |
44 | * **main:** release 3.0.4 ([01051e9](https://github.com/bjerkio/oidc-react/commit/01051e9d8117cba5ca0ddb631a20a5af179214ec))
45 |
46 | ## [3.0.3](https://github.com/bjerkio/oidc-react/compare/v3.0.2...v3.0.3) (2023-03-16)
47 |
48 |
49 | ### Bug Fixes
50 |
51 | * handle both null user and user.expired when autoSignIn is disabled ([#977](https://github.com/bjerkio/oidc-react/issues/977)) ([1a95930](https://github.com/bjerkio/oidc-react/commit/1a9593060f902ae89880fb6bfd076bb24fbac8ab))
52 |
53 | ## [3.0.2](https://github.com/bjerkio/oidc-react/compare/v3.0.1...v3.0.2) (2023-03-12)
54 |
55 |
56 | ### Bug Fixes
57 |
58 | * handle token refresh failure ([#968](https://github.com/bjerkio/oidc-react/issues/968)) ([751732b](https://github.com/bjerkio/oidc-react/commit/751732b636b1911ff07bb86e34fff80ff5f39933))
59 |
60 | ## [3.0.1](https://github.com/bjerkio/oidc-react/compare/v3.0.0...v3.0.1) (2023-03-08)
61 |
62 |
63 | ### Bug Fixes
64 |
65 | * avoid reinitiating partial authentication flow when user is already authenticated ([#962](https://github.com/bjerkio/oidc-react/issues/962)) ([7c88d80](https://github.com/bjerkio/oidc-react/commit/7c88d800d2dd64f8b032787076709fc98cf8486d))
66 |
67 | ## [3.0.0](https://github.com/bjerkio/oidc-react/compare/v2.1.0...v3.0.0) (2023-03-01)
68 |
69 |
70 | ### ⚠ BREAKING CHANGES
71 |
72 | * `signIn` and `signOutRedirect` now has it's own types.
73 |
74 | ### Features
75 |
76 | * add sourcemap and comments ([#947](https://github.com/bjerkio/oidc-react/issues/947)) ([a605296](https://github.com/bjerkio/oidc-react/commit/a605296a7ebffe9952850593b22670475f4701f9))
77 | * pin and update all dependencies ([#948](https://github.com/bjerkio/oidc-react/issues/948)) ([caf90a7](https://github.com/bjerkio/oidc-react/commit/caf90a789c1864b01648578c874ca85b818cdf0a))
78 | * update + pin a key dependencies in use ([#945](https://github.com/bjerkio/oidc-react/issues/945)) ([9e69e80](https://github.com/bjerkio/oidc-react/commit/9e69e80a5fc1e2596ed2b176f95d3ae8b3ac655b))
79 |
80 |
81 | ### Bug Fixes
82 |
83 | * remove bundlesize dependency ([#936](https://github.com/bjerkio/oidc-react/issues/936)) ([e9f8d8a](https://github.com/bjerkio/oidc-react/commit/e9f8d8a596eb695c875956bd00c3c379fb4e4898))
84 | * validation environment ([#945](https://github.com/bjerkio/oidc-react/issues/945)) ([9e69e80](https://github.com/bjerkio/oidc-react/commit/9e69e80a5fc1e2596ed2b176f95d3ae8b3ac655b))
85 |
86 |
87 | ### Code Refactoring
88 |
89 | * add types ([#945](https://github.com/bjerkio/oidc-react/issues/945)) ([9e69e80](https://github.com/bjerkio/oidc-react/commit/9e69e80a5fc1e2596ed2b176f95d3ae8b3ac655b))
90 |
91 | ## [2.1.0](https://github.com/bjerkio/oidc-react/compare/v2.0.3...v2.1.0) (2022-10-23)
92 |
93 |
94 | ### Features
95 |
96 | * add extraQueryParams to AuthProvider ([#890](https://github.com/bjerkio/oidc-react/issues/890)) ([89dc4ea](https://github.com/bjerkio/oidc-react/commit/89dc4ea0a1aaecabe73c164a7f519b03e94c28d4))
97 |
98 | ## [2.0.3](https://github.com/bjerkio/oidc-react/compare/v2.0.2...v2.0.3) (2022-08-04)
99 |
100 |
101 | ### Bug Fixes
102 |
103 | * use memoized context value ([#880](https://github.com/bjerkio/oidc-react/issues/880)) ([3342a8d](https://github.com/bjerkio/oidc-react/commit/3342a8d29a7b42d4428bd01a409ca079619e9549))
104 |
105 | ## [2.0.2](https://github.com/bjerkio/oidc-react/compare/v2.0.1...v2.0.2) (2022-08-03)
106 |
107 |
108 | ### Bug Fixes
109 |
110 | * alway userData=null - isLoading=true ([#877](https://github.com/bjerkio/oidc-react/issues/877)) ([d2d78ce](https://github.com/bjerkio/oidc-react/commit/d2d78ce29fced9598bf9928fd4561fb83c9d9834))
111 |
112 | ## [2.0.1](https://github.com/bjerkio/oidc-react/compare/v2.0.0...v2.0.1) (2022-08-02)
113 |
114 |
115 | ### Bug Fixes
116 |
117 | * Add React 17 to peer dependencies ([#874](https://github.com/bjerkio/oidc-react/issues/874)) ([54fd6e0](https://github.com/bjerkio/oidc-react/commit/54fd6e0ea21b773e26e9e5fb0a42610de54097e5))
118 |
119 | ## [2.0.0](https://github.com/bjerkio/oidc-react/compare/v1.5.1...v2.0.0) (2022-07-25)
120 |
121 |
122 | ### ⚠ BREAKING CHANGES
123 |
124 | * replace oidc-client-js with oidc-client-ts (#860)
125 | * migrate to react 18 (#827)
126 |
127 | ### Features
128 |
129 | * create ES5 output for IE11 compatibility. ([#696](https://github.com/bjerkio/oidc-react/issues/696)) ([4d9712c](https://github.com/bjerkio/oidc-react/commit/4d9712c1882384cc89311c16a56bc6b091a53b0c))
130 | * migrate to react 18 ([#827](https://github.com/bjerkio/oidc-react/issues/827)) ([28e998a](https://github.com/bjerkio/oidc-react/commit/28e998a1c56c8fd32ef15143ae4d31993f8d22d5))
131 |
132 |
133 | ### Bug Fixes
134 |
135 | * initUserManager in AuthContext called every render call ([#764](https://github.com/bjerkio/oidc-react/issues/764)) ([2cef6c7](https://github.com/bjerkio/oidc-react/commit/2cef6c748be19f278ba49900025f92dbd392885e))
136 | * move release-please to after checkout ([9b70ccf](https://github.com/bjerkio/oidc-react/commit/9b70ccf581e8844d63717a17797790a0c0419443))
137 |
138 |
139 | ### Code Refactoring
140 |
141 | * replace oidc-client-js with oidc-client-ts ([#860](https://github.com/bjerkio/oidc-react/issues/860)) ([a07bb70](https://github.com/bjerkio/oidc-react/commit/a07bb705d4cd6d4074a055f46b83b2b4053fed1b))
142 |
143 | ## [1.6.0](https://github.com/bjerkio/oidc-react/compare/v1.5.1...v1.6.0) (2022-07-15)
144 |
145 | ### Features
146 |
147 | * Change dependency from no longer maintained [oidc-client-js](https://github.com/IdentityModel/oidc-client-js) to its official successor [oidc-client-ts](https://github.com/authts/oidc-client-ts)
148 |
149 |
150 | ## [1.5.1](https://github.com/bjerkio/oidc-react/compare/v1.5.0...v1.5.1) (2021-04-11)
151 |
152 |
153 | ### Bug Fixes
154 |
155 | * AuthContext cannot be null ([#576](https://github.com/bjerkio/oidc-react/issues/576)) ([61bd0fa](https://github.com/bjerkio/oidc-react/commit/61bd0fa65dbd682437aee3aae13258b8f4668f69))
156 |
157 | # [1.5.0](https://github.com/bjerkio/oidc-react/compare/v1.4.0...v1.5.0) (2021-04-10)
158 |
159 |
160 | ### Features
161 |
162 | * `isLoading` state ([#577](https://github.com/bjerkio/oidc-react/issues/577)) ([b24e9ff](https://github.com/bjerkio/oidc-react/commit/b24e9ff5434b7ddf59000890637fbca36cf8e8ec))
163 |
164 | # [1.4.0](https://github.com/bjerkio/oidc-react/compare/v1.3.0...v1.4.0) (2021-03-15)
165 |
166 |
167 | ### Features
168 |
169 | * Add silentRedirectUri option. ([#528](https://github.com/bjerkio/oidc-react/issues/528)) ([a349d4d](https://github.com/bjerkio/oidc-react/commit/a349d4dc770ed22af9c68b9c5c178550382e7006))
170 |
171 | # [1.3.0](https://github.com/bjerkio/oidc-react/compare/v1.2.1...v1.3.0) (2021-03-11)
172 |
173 |
174 | ### Features
175 |
176 | * upgrade to oidc-client 1.11.5 ([#527](https://github.com/bjerkio/oidc-react/issues/527)) ([3943c94](https://github.com/bjerkio/oidc-react/commit/3943c942237cfc6bbe8346ef1543a9a0fcf202f9))
177 |
178 | ## [1.2.1](https://github.com/bjerkio/oidc-react/compare/v1.2.0...v1.2.1) (2021-03-09)
179 |
180 |
181 | ### Bug Fixes
182 |
183 | * state update on an unmounted component ([#522](https://github.com/bjerkio/oidc-react/issues/522)) ([0e873f4](https://github.com/bjerkio/oidc-react/commit/0e873f4e6ac7d14cc39f4cb5196b2a79b866da93))
184 |
185 | # [1.2.0](https://github.com/bjerkio/oidc-react/compare/v1.1.6...v1.2.0) (2021-03-08)
186 |
187 |
188 | ### Features
189 |
190 | * Add signInPopup method ([#479](https://github.com/bjerkio/oidc-react/issues/479)) ([a50c196](https://github.com/bjerkio/oidc-react/commit/a50c196bba92cc95698eb10d7e5b68eb7b0959b1))
191 |
192 | ## [1.1.6](https://github.com/bjerkio/oidc-react/compare/v1.1.5...v1.1.6) (2021-02-03)
193 |
194 |
195 | ### Bug Fixes
196 |
197 | * Remove `getUser` in callback handler ([#461](https://github.com/bjerkio/oidc-react/issues/461)) ([7abb83d](https://github.com/bjerkio/oidc-react/commit/7abb83d97135aed1370c3a86582a1a689fa676f5)), closes [#447](https://github.com/bjerkio/oidc-react/issues/447)
198 |
199 | ## [1.1.5](https://github.com/bjerkio/oidc-react/compare/v1.1.4...v1.1.5) (2020-12-22)
200 |
201 |
202 | ### Bug Fixes
203 |
204 | * Load new state from session/local storage when available after a silent renew ([#363](https://github.com/bjerkio/oidc-react/issues/363)) ([319d0e3](https://github.com/bjerkio/oidc-react/commit/319d0e34d3f890a4838f436af6b4cb3859a0ad85))
205 |
206 | ## [1.1.4](https://github.com/bjerkio/oidc-react/compare/v1.1.3...v1.1.4) (2020-12-19)
207 |
208 |
209 | ### Bug Fixes
210 |
211 | * Including 'Log' in export ([#383](https://github.com/bjerkio/oidc-react/issues/383)) ([1f10c07](https://github.com/bjerkio/oidc-react/commit/1f10c075f90dcf0e2abb3d48ea768c38164f2f74))
212 |
213 | ## [1.1.3](https://github.com/bjerkio/oidc-react/compare/v1.1.2...v1.1.3) (2020-10-24)
214 |
215 |
216 | ### Bug Fixes
217 |
218 | * Remove react-router 🤷 ([527bcd3](https://github.com/bjerkio/oidc-react/commit/527bcd3a9d07fd3097924d022b13d31afb7d2dcf))
219 |
220 | ## [1.1.2](https://github.com/bjerkio/oidc-react/compare/v1.1.1...v1.1.2) (2020-10-24)
221 |
222 |
223 | ### Bug Fixes
224 |
225 | * Move react, react-dom to peerDependencies ([b4fd437](https://github.com/bjerkio/oidc-react/commit/b4fd437dfb81248766cb5be59b2bd684e95dcf7e)), closes [#301](https://github.com/bjerkio/oidc-react/issues/301)
226 |
227 | ## [1.1.1](https://github.com/bjerkio/oidc-react/compare/v1.1.0...v1.1.1) (2020-10-09)
228 |
229 |
230 | ### Bug Fixes
231 |
232 | * change callback method to allow other sign in method ([c497f49](https://github.com/bjerkio/oidc-react/commit/c497f49ddbca100ff5f52419ce07ac64c00d2656))
233 |
234 | # [1.1.0](https://github.com/bjerkio/oidc-react/compare/v1.0.1...v1.1.0) (2020-09-26)
235 |
236 |
237 | ### Features
238 |
239 | * add auto silent renew option ([6bb2df5](https://github.com/bjerkio/oidc-react/commit/6bb2df5e1c7c8b9f12fc220bcd51c1eac4890fe4))
240 |
241 | ## [1.0.1](https://github.com/bjerkio/oidc-react/compare/v1.0.0...v1.0.1) (2020-08-21)
242 |
243 |
244 | ### Bug Fixes
245 |
246 | * this._signinStart is not a function ([20b1e57](https://github.com/bjerkio/oidc-react/commit/20b1e57b1b8a15276a04498081560ccce03e0c73)), closes [#173](https://github.com/bjerkio/oidc-react/issues/173)
247 |
248 | # 1.0.0 (2020-08-20)
249 |
250 |
251 | ### Bug Fixes
252 |
253 | * Autosignin on expired user ([d5dce04](https://github.com/bjerkio/oidc-react/commit/d5dce04f51bdfcff49ab622f60875aedfe17fdb5))
254 | * Fix withAuth export ([4e0e2e1](https://github.com/bjerkio/oidc-react/commit/4e0e2e11675eda83fc543779d53f51f2ff96284e))
255 | * Package size and target ([b9c8205](https://github.com/bjerkio/oidc-react/commit/b9c820524cd34f030d823af867df3d51ad2d2bd7))
256 | * Useless conditional ([6cf9dda](https://github.com/bjerkio/oidc-react/commit/6cf9ddad48728b50c4f17ce7ade18f67ee1faccf))
257 | * Variable 'user' cannot be of type null ([0d8a0c3](https://github.com/bjerkio/oidc-react/commit/0d8a0c3110aec43b4e8c22b6385df8fcbd64147d))
258 |
259 |
260 | ### Code Refactoring
261 |
262 | * Improve createContext setup ([6b715f5](https://github.com/bjerkio/oidc-react/commit/6b715f5ad8f78fdb1306cfc399b5f26a2bdc5a14))
263 |
264 |
265 | ### Features
266 |
267 | * add client_secret ([151a494](https://github.com/bjerkio/oidc-react/commit/151a494a0faf48483086ce75435ab033335c54ca))
268 | * Add improved API layout ([1e3d66a](https://github.com/bjerkio/oidc-react/commit/1e3d66a1d336d6f0e6e6310e33b4061e9c50e46a)), closes [#36](https://github.com/bjerkio/oidc-react/issues/36)
269 | * Add onBeforeSignIn hook ([e2f609e](https://github.com/bjerkio/oidc-react/commit/e2f609ef205cc05f4040a6281460ccd2a2441e35))
270 | * add option to use signoutRedirect ([9ca3ada](https://github.com/bjerkio/oidc-react/commit/9ca3ada0e2ef1fdba81397ec2044928cc5844a87))
271 | * add option to use signoutRedirect ([d2c4278](https://github.com/bjerkio/oidc-react/commit/d2c42782edd676ae68ccedf45dde18d696f32447))
272 | * Add responseType and scope properties ([e00454a](https://github.com/bjerkio/oidc-react/commit/e00454a50606d287063a3134cfe3740e2ee360f8))
273 | * Add withAuth higher order component ([9f2cea8](https://github.com/bjerkio/oidc-react/commit/9f2cea8c74476a7e74490cd8ae18e82a832d18e0))
274 | * First implementation ([071d311](https://github.com/bjerkio/oidc-react/commit/071d311b7bd4810648c7a18150e2d98e23328258))
275 | * re-export User and UserManager ([a2fdf39](https://github.com/bjerkio/oidc-react/commit/a2fdf39c88dadfe28e8f605ddfc5825c294a017b))
276 |
277 |
278 | ### BREAKING CHANGES
279 |
280 | * Typescript users might not expect the Context to be 'null'. Now you have to check
281 | it.
282 |
283 | # [1.0.0-alpha.7](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2020-05-15)
284 |
285 |
286 | ### Bug Fixes
287 |
288 | * Useless conditional ([6cf9dda](https://github.com/bjerkio/oidc-react/commit/6cf9ddad48728b50c4f17ce7ade18f67ee1faccf))
289 | * Variable 'user' cannot be of type null ([0d8a0c3](https://github.com/bjerkio/oidc-react/commit/0d8a0c3110aec43b4e8c22b6385df8fcbd64147d))
290 |
291 |
292 | ### Code Refactoring
293 |
294 | * Improve createContext setup ([6b715f5](https://github.com/bjerkio/oidc-react/commit/6b715f5ad8f78fdb1306cfc399b5f26a2bdc5a14))
295 |
296 |
297 | ### Features
298 |
299 | * Add improved API layout ([1e3d66a](https://github.com/bjerkio/oidc-react/commit/1e3d66a1d336d6f0e6e6310e33b4061e9c50e46a)), closes [#36](https://github.com/bjerkio/oidc-react/issues/36)
300 | * add option to use signoutRedirect ([d2c4278](https://github.com/bjerkio/oidc-react/commit/d2c42782edd676ae68ccedf45dde18d696f32447))
301 |
302 |
303 | ### BREAKING CHANGES
304 |
305 | * Typescript users might not expect the Context to be 'null'. Now you have to check
306 | it.
307 |
308 | # [1.0.0-alpha.6](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2020-05-15)
309 |
310 |
311 | ### Features
312 |
313 | * add option to use signoutRedirect ([9ca3ada](https://github.com/bjerkio/oidc-react/commit/9ca3ada0e2ef1fdba81397ec2044928cc5844a87))
314 |
315 | # [1.0.0-alpha.5](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2020-04-21)
316 |
317 |
318 | ### Bug Fixes
319 |
320 | * Autosignin on expired user ([d5dce04](https://github.com/bjerkio/oidc-react/commit/d5dce04f51bdfcff49ab622f60875aedfe17fdb5))
321 | * Fix withAuth export ([4e0e2e1](https://github.com/bjerkio/oidc-react/commit/4e0e2e11675eda83fc543779d53f51f2ff96284e))
322 |
323 | # [1.0.0-alpha.4](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2020-04-16)
324 |
325 |
326 | ### Features
327 |
328 | * Add onBeforeSignIn hook ([e2f609e](https://github.com/bjerkio/oidc-react/commit/e2f609ef205cc05f4040a6281460ccd2a2441e35))
329 | * Add withAuth higher order component ([9f2cea8](https://github.com/bjerkio/oidc-react/commit/9f2cea8c74476a7e74490cd8ae18e82a832d18e0))
330 |
331 | # [1.0.0-alpha.3](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2020-04-09)
332 |
333 |
334 | ### Bug Fixes
335 |
336 | * Package size and target ([b9c8205](https://github.com/bjerkio/oidc-react/commit/b9c820524cd34f030d823af867df3d51ad2d2bd7))
337 |
338 | # [1.0.0-alpha.2](https://github.com/bjerkio/oidc-react/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2020-04-09)
339 |
340 |
341 | ### Features
342 |
343 | * Add responseType and scope properties ([e00454a](https://github.com/bjerkio/oidc-react/commit/e00454a50606d287063a3134cfe3740e2ee360f8))
344 |
345 | # 1.0.0-alpha.1 (2020-04-09)
346 |
347 |
348 | ### Features
349 |
350 | * First implementation ([071d311](https://github.com/bjerkio/oidc-react/commit/071d311b7bd4810648c7a18150e2d98e23328258))
351 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to oidc-react
2 |
3 | :+1::tada: Thanks for taking the time to contribute! :tada::+1:
4 |
5 | The following is a set of guidelines for contributing. These are just
6 | guidelines, not rules, so use your best judgment and feel free to propose
7 | changes to this document in a pull request.
8 |
9 | ## Issues and Pull Requests
10 |
11 | - If you're not sure about adding something,
12 | [open an issue](https://github.com/bjerkio/oidc-react/issues/new) to discuss
13 | it.
14 | - Feel free to open a Pull Request early so that a discussion can be had as
15 | changes are developed.
16 |
17 | ## Commit Messages and Pull Request Titles
18 |
19 | We use the
20 | [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
21 | specification to standardize our commit history. To enforce this convention on
22 | commit messages and/or pull request titles, we use the
23 | [Semantic Pull Requests](https://github.com/probot/semantic-pull-requests) bot.
24 |
25 | The commit message summary (or pull request title) is constructed by prepending
26 | the type of change being made (e.g., feat, fix, refactor), followed by an
27 | imperative, present tense sentence (without a period). Example:
28 | `fix: make header bold`.
29 |
30 | If you are still working on your pull request, prepend `WIP:` to indicate that
31 | it's work in progress.
32 |
33 | ### Pull Request Title
34 |
35 | Same as commit messages, prepend the type of change being made (refactor, fix,
36 | chore, feat, etc.) Example: `docs: add linux setup instructions`
37 |
38 | ## Documentation
39 |
40 | Most of the documentation are automatically generated. We utilize `typedoc` that
41 | uses tags inline with classes in order to generate. The nice thing about this is
42 | that documentation will be visible when using Typescript in editors as well.
43 |
44 | However, we love to have examples and guides as well.
45 |
46 | ## Need Help?
47 |
48 | If any of this information confusing, incorrect, or incomplete, feel free to
49 | [open an issue](https://github.com/bjerkio/oidc-react/issues/new) for help.
50 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2020 Bjerk AS
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a
4 | copy of this software and associated documentation files (the "Software"),
5 | to deal in the Software without restriction, including without limitation
6 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 | and/or sell copies of the Software, and to permit persons to whom the
8 | Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included
11 | in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
17 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OIDC React
2 |
3 | [](https://github.com/prettier/prettier)
4 | [](https://github.com/prettier/prettier)
5 | [](http://commitizen.github.io/cz-cli/)
6 | [](https://github.com/semantic-release/semantic-release)
7 | [](https://codecov.io/gh/bjerkio/oidc-react)
8 |
9 | 
10 |
11 | ## About
12 |
13 | React component (AuthProvider) to provide OpenID Connect and OAuth2 protocol
14 | support. Has [hooks](guides/HOOKS.md) 🎉
15 |
16 | Based on [oidc-client-ts](https://github.com/authts/oidc-client-ts).
17 |
18 | ## Quickstart
19 |
20 | Install packages by running:
21 |
22 | ```shell
23 | $ npm install oidc-react
24 | ```
25 |
26 | ## Usage
27 |
28 | ```tsx
29 | import { AuthProvider } from 'oidc-react';
30 |
31 | const oidcConfig = {
32 | onSignIn: () => {
33 | // Redirect?
34 | },
35 | authority: 'https://oidc.io/oauth',
36 | clientId: 'this-is-a-client-id',
37 | redirectUri: 'https://my-app.com/',
38 | };
39 |
40 | const Routes = () => (
41 |
Hello {auth.profile.name}!
; 19 | }; 20 | ``` 21 | 22 | The example above uses `id_token` object (`profile`) and displays the name of 23 | the user. 24 | 25 | It should be as easy as that! 26 | -------------------------------------------------------------------------------- /guides/QUICKSTART.md: -------------------------------------------------------------------------------- 1 | # Quickstart 2 | 3 | First step is to install the package. 4 | 5 | ```shell 6 | $ npm install oidc-react 7 | ``` 8 | 9 | ## Setting up `AuthProvider` 10 | 11 | AuthProvider is a [Context](https://reactjs.org/docs/context.html) and holds 12 | most of the functionality of this package. In order to make it work with your 13 | very own OIDC server, you'll have to either setup your own 14 | [`UserManager`](https://authts.github.io/oidc-client-ts/classes/UserManager.html) 15 | or use the shortcut. In this guide, we'll use our shortcuts. 16 | 17 | Let's look at an example component. 18 | 19 | ```tsx 20 | import { AuthProvider } from 'oidc-react'; 21 | 22 | export default () => ( 23 |Hello {this.props.authData.profile.name}!
; 18 | } 19 | } 20 | 21 | export default withAuth(Hello); 22 | ``` 23 | 24 | The example above uses `id_token` object (`profile`) and displays the name of 25 | the user. 26 | 27 | It should be as easy as that! 28 | -------------------------------------------------------------------------------- /guides/migrate-v1-v2.md: -------------------------------------------------------------------------------- 1 | # Migrate from v1 to v2 2 | 3 | Back in june 2021 `oidc-client-js` was deprecated, which lead us to start 4 | looking for a suitable replacement. Keeping tabs on what could suit our needs 5 | and the maintainability of the library had us wait until now. 6 | 7 | The largest change is migrating from `oidc-client-js` to `oidc-client-ts`. For 8 | consumers of this package, this means mostly that if you are importing 9 | `oidc-client` somewhere in your code. You have to replace it with 10 | `oidc-client-ts`. 11 | 12 | You can find more documentation on `oidc-client-ts` here: 13 | https://github.com/authts/oidc-client-ts 14 | 15 | They have written a migration guide, you can find that here: 16 | https://github.com/authts/oidc-client-ts/blob/main/docs/migration.md 17 | 18 | Other than that, we have also started supporting React 18. 🚀 19 | 20 | We haven't tested this extensively, so be sure to share your input and 21 | experiences with us! 22 | 23 | Thank you for using `oidc-react`. 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oidc-react", 3 | "version": "3.4.1", 4 | "private": false, 5 | "description": "OpenID Connect Authentication for React. Supports Hooks 🚀", 6 | "repository": "github:bjerkio/oidc-react", 7 | "license": "MIT", 8 | "author": "Bjerk AS", 9 | "main": "build/src/index.js", 10 | "packageManager": "pnpm@8.15.9", 11 | "files": [ 12 | "/build" 13 | ], 14 | "prettier": "@simenandre/prettier", 15 | "scripts": { 16 | "start": "node build/index.js", 17 | "build": "tsc -p tsconfig.release.json", 18 | "test": "vitest", 19 | "format": "prettier --write .", 20 | "format:check": "prettier --check .", 21 | "lint": "eslint .", 22 | "generate-docs": "typedoc" 23 | }, 24 | "dependencies": { 25 | "oidc-client-ts": "^2.4.0" 26 | }, 27 | "devDependencies": { 28 | "@bjerk/eslint-config": "^6.0.2", 29 | "@simenandre/prettier": "^5.0.0", 30 | "@testing-library/react": "^16.0.0", 31 | "@types/node": "^20.0.0", 32 | "@types/react": "^18.2.12", 33 | "eslint": "^9.0.0", 34 | "jsdom": "^22.1.0", 35 | "prettier": "^3.0.3", 36 | "react": "^18.2.0", 37 | "react-dom": "^18.2.0", 38 | "ts-node-dev": "^2.0.0", 39 | "typedoc": "^0.26.10", 40 | "typedoc-plugin-markdown": "^4.2.9", 41 | "typescript": "^5.2.2", 42 | "vitest": "^2.0.0" 43 | }, 44 | "peerDependencies": { 45 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0", 46 | "react-dom": "^16.8.0 || || ^17.0.0 || ^18.0.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/__tests__/auth-context.test.tsx: -------------------------------------------------------------------------------- 1 | // @vitest-environment jsdom 2 | import React from 'react'; 3 | import { SilentRenewErrorCallback, UserManager } from 'oidc-client-ts'; 4 | import { AuthProvider, AuthContext } from '../auth-context'; 5 | import { render, act, waitFor, RenderResult } from '@testing-library/react'; 6 | import { describe, it, expect, vi } from 'vitest'; 7 | 8 | const events = { 9 | addUserLoaded: () => undefined, 10 | removeUserLoaded: () => undefined, 11 | addSilentRenewError: () => undefined, 12 | removeSilentRenewError: () => undefined, 13 | }; 14 | 15 | vi.mock('oidc-client-ts', () => { 16 | return { 17 | UserManager: vi.fn().mockImplementation(() => { 18 | return { 19 | getUser: vi.fn(), 20 | signinRedirect: vi.fn(), 21 | events, 22 | }; 23 | }), 24 | }; 25 | }); 26 | 27 | describe('AuthContext', () => { 28 | it('should check for user and redirect', async () => { 29 | const u = { 30 | getUser: vi.fn(), 31 | signinRedirect: vi.fn(), 32 | events, 33 | } as any; 34 | const onBeforeSignIn = vi.fn(); 35 | await act(async () => { 36 | render(Bjerk
; 56 | }} 57 |Bjerk
; 79 | }} 80 |Bjerk
; 293 | }} 294 |Bjerk
; 320 | }} 321 |Bjerk
; 345 | }} 346 |( 9 | Component: React.ComponentType
,
10 | ): React.ComponentType