Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
FolderOrigin-RevId: /usr/src/app/bi-sdk-js
  • Loading branch information
ismailmustafa authored and bi-ci-bot committed Feb 8, 2023
1 parent 6739cab commit 8a80ad2
Show file tree
Hide file tree
Showing 43 changed files with 34,996 additions and 1,211 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2023-01-09
### Added
- Support for authenticating with Auth0 and Okta in the example app

### Changed
- Rename instances of `Credential` to `Passkey`
- Nest tenantId, realmId, and identityId under appropriate objects in the `Credential`
- Update support links in the example app

### Fixed
- Scheme without a path is now recognized as a valid URL when binding a credential
- Issues where SWC wasn't able to compile the JS SDK

## [1.0.10] - 2022-10-17

### Changed
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,37 @@
</p>
</p>

# Beyond Identity JS SDK
# Beyond Identity JavaScript SDK

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

### Embedded
### Embedded SDK

Offering the entire experience embedded in your product. Users will not need to navigate to the Beyond Identity Authenticator.
Goodbye, passwords! The Beyond Identity SDKs allow you to embed the Passwordless experience into your product. Users will not need to download the Beyond Identity Authenticator. These SDKs supports OIDC and OAuth2.

## Installation

```
yarn add @beyondidentity/bi-sdk-js
```
or
or
```
npm install @beyondidentity/bi-sdk-js
```

## Usage

Check out the [Developer Documentation](https://developer.beyondidentity.com) and the [SDK API Documentation](https://gobeyondidentity.github.io/bi-sdk-js/) for more information.

### Setup

First, before calling the Embedded functions, make sure to initialize the SDK.

```typescript
import * as embeddedsdk from "@beyondidentity/bi-sdk-js";
import { Embedded } from '@beyondidentity/bi-sdk-js';

async function initialize(): Promise<embeddedsdk.Embedded> {
return embeddedsdk.Embedded.initialize();
}
const embedded = await Embedded.initialize();
```
Check out the [documentation](https://developer.beyondidentity.com) for more information.

## Example App

Expand Down
16,414 changes: 16,412 additions & 2 deletions coresdk/dist/bi-core.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion coresdk/dist/bi-core.js.LICENSE.txt

This file was deleted.

4 changes: 2 additions & 2 deletions coresdk/dist/src/messaging/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface HandleBiAuthenticateUrlResponse {
message?: string;
}
export interface HandleBindCredentialUrlResponse {
credential: CredentialV1;
credential: CoreCredentialV1;
post_binding_redirect_uri?: string;
}
export declare type HandleUrlResponse = {
Expand All @@ -92,7 +92,7 @@ export declare type HandleUrlResponse = {
} | {
BindCredential: HandleBindCredentialUrlResponse;
};
/** Helper method for constructing UrlResponse from rust HandleUrlRespone objects. */
/** Helper method for constructing UrlResponse from rust HandleUrlResponse objects. */
export declare function toUrlResponse(rsp: HandleUrlResponse): UrlResponse;
export interface HostFilePath {
path_type: PathType;
Expand Down
6 changes: 3 additions & 3 deletions coresdk/dist/src/types/v1.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ export interface CredentialV1 {
localCreated: string;
localUpdated: string;
apiBaseUrl: string;
tenantId: TenantId;
realmId: RealmId;
identityId: IdentityId;
keyHandle: KeyHandle;
keyType?: KeyType;
state: "Active" | "Revoked";
Expand All @@ -27,9 +24,11 @@ export interface CredentialV1 {
theme: ThemeV1;
}
export interface RealmV1 {
id: RealmId;
displayName: string;
}
export interface IdentityV1 {
id: IdentityId;
displayName: string;
username: string;
primaryEmailAddress?: string;
Expand All @@ -40,6 +39,7 @@ export interface ThemeV1 {
supportUrl: string;
}
export interface TenantV1 {
id: TenantId;
displayName: string;
}
/**
Expand Down
15 changes: 10 additions & 5 deletions coresdk/lib/kmc/kmc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,25 @@ export interface InitOutput {
readonly __wbindgen_malloc: (a: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3b7fc7c7d3dbc2f5: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hba2a80105f7f36c3: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4f46b99fa6148235: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h29c46999e2028121: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h30dde08fec25eef2: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_exn_store: (a: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__hbfce226dd892b781: (a: number, b: number, c: number, d: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h3c1ea71b79f0e337: (a: number, b: number, c: number, d: number) => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Synchronously compiles the given `bytes` and instantiates the WebAssembly module.
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {BufferSource} bytes
* @param {SyncInitInput} module
*
* @returns {InitOutput}
*/
export function initSync(bytes: BufferSource): InitOutput;
export function initSync(module: SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
Expand Down
Loading

0 comments on commit 8a80ad2

Please sign in to comment.