oidc client
v7.23.1
@axa-fr/oidc-client@axa-fr/react-oidc@axa-fr/svelte-oidc :我们正在寻找贡献者@axa-fr/vue-oidc :我们正在寻找贡献者@axa-fr/angular-oidc :我们正在寻找贡献者@axa-fr/oidc-client使用OpenID Connect(OIDC)和OAUTH2协议管理身份验证的最轻和最验证库。它与所有OIDC提供商兼容。 @axa-fr/oidc-client是纯JavaScript库。它可以与任何JavaScript框架或库一起使用。 @ axa-fr / react-oidc用于react (兼容下一步。
演示:
@axa-fr/oidc-client是:
FAQ部分的良好实践)61.1kB ,缩小+GZPICKED 16.8kB PKG pkg统计数据通过bundlephobia.com与:
npm install @axa-fr/oidc-client --save
# To install or update OidcServiceWorker.js file, you can run
node ./node_modules/@axa-fr/oidc-client/bin/copy-service-worker-files.mjs public
# If you have a "public" folder, the 2 files will be created :
# ./public/OidcServiceWorker.js <-- will be updated at each "npm install"
# ./public/OidcTrustedDomains.js <-- won't be updated if already exist 警告
如果使用Service Worker模式,则OidcServiceWorker.js文件应始终与库的版本保持最新。您可以在package.json中设置一个post -indstall脚本。例如 :
"scripts" : {
...
"postinstall" : " node ./node_modules/@axa-fr/oidc-client/bin/copy-service-worker-files.mjs public "
},更多文档:
@axa-fr/oidc-clientnpm install @axa-fr/react-oidc --save
# To install or update OidcServiceWorker.js file, you can run
node ./node_modules/@axa-fr/react-oidc/bin/copy-service-worker-files.mjs public
# If you have a "public" folder, the 2 files will be created :
# ./public/OidcServiceWorker.js <-- will be updated at each "npm install"
# ./public/OidcTrustedDomains.js <-- won't be updated if already exist 警告
如果使用服务工作者模式,则oidcserviceworker.js文件应始终使用库的版本。您可以在软件包中设置一个post -indstall脚本。例如 :
"scripts" : {
...
"postinstall" : " node ./node_modules/@axa-fr/react-oidc/bin/copy-service-worker-files.mjs public "
},更多文档:
@axa-fr/react-oidc git clone https://github.com/AxaFrance/oidc-client.git
cd oidc-client
pnpm install
# oidc client demo
cd examples/oidc-client-demo
pnpm install
pnpm start
# then navigate to http://localhost:5174
# react vite demo
cd examples/react-oidc-demo
pnpm install
pnpm start
# then navigate to http://localhost:4200
# react NextJS demo
cd examples/nextjs-demo
pnpm install
pnpm run dev
# then navigate to http://localhost:3001
服务工作者捕获访问访问和refresh_token ,客户将永远无法访问。
这些组件封装了“ @axa-fr/oidc-client ”的使用,以隐藏工作流程的复杂性。本地历史记录API在内部用于“ @axa-fr/react-oidc ”,用于路由器库不可知。
有关OIDC的更多信息:
FAQ guideguideguideguideguide