@coveo/auth
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -50,7 +50,8 @@ /** | ||
async exchangeHandshakeToken() { | ||
const { location: location2, history: history2, request } = options; | ||
const { organizationId, location: location2, history: history2, request } = options; | ||
const encodedOrgId = encodeURIComponent(organizationId); | ||
const handshakeToken = getHandshakeToken(location2); | ||
removeHandshakeToken(location2, history2); | ||
try { | ||
const response = await request(`${api}/handshake/token`, { | ||
const response = await request(`${api}/handshake/token?organizationId=${encodedOrgId}`, { | ||
method: "POST", | ||
@@ -57,0 +58,0 @@ body: JSON.stringify({ handshakeToken }), |
@@ -63,7 +63,8 @@ /** | ||
async exchangeHandshakeToken() { | ||
const { location: location2, history: history2, request } = options; | ||
const { organizationId, location: location2, history: history2, request } = options; | ||
const encodedOrgId = encodeURIComponent(organizationId); | ||
const handshakeToken = getHandshakeToken(location2); | ||
removeHandshakeToken(location2, history2); | ||
try { | ||
const response = await request(`${api}/handshake/token`, { | ||
const response = await request(`${api}/handshake/token?organizationId=${encodedOrgId}`, { | ||
method: "POST", | ||
@@ -70,0 +71,0 @@ body: JSON.stringify({ handshakeToken }), |
{ | ||
"name": "@coveo/auth", | ||
"private": false, | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Functions to help authenticate with the Coveo platform.", | ||
@@ -6,0 +6,0 @@ "main": "./dist/auth.js", |
@@ -15,10 +15,10 @@ # @coveo/auth | ||
2. Instantiate the SAML client provided by this package in your web application. | ||
2. Inside your web application, instantiate the SAML client in this package. | ||
### Sample | ||
### Example | ||
``` | ||
import {buildSamlClient} from '@coveo/auth`; | ||
const organizationId = '<your organization id>'; | ||
const provider = '<your configured SAML provider name>'; | ||
const organizationId = '<organization id>'; | ||
const provider = '<configured SAML auth provider name>'; | ||
@@ -33,3 +33,3 @@ async function main() { | ||
``` | ||
### Sample with `@coveo/headless` | ||
### Example with `@coveo/headless` | ||
@@ -55,4 +55,8 @@ ``` | ||
``` | ||
React sample [available here](../samples/headless-react/src/pages/SamlPage.tsx). | ||
### Example with `@coveo/headless` and `React` | ||
- Code example [available here](../samples/headless-react/src/pages/SamlPage.tsx). | ||
## Reference | ||
### `SamlClientOptions` | ||
@@ -59,0 +63,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
25950
382
73
2