bindid-react-native 1.0.0
Install from the command line:
Learn more about npm packages
$ npm install @transmitsecurity/bindid-react-native@1.0.0
Install via package.json:
"@transmitsecurity/bindid-react-native": "1.0.0"
About this version
Welcome to the future of customer authentication—strong, portable authentication across all your channels.
The BindID service is an app-less, strong portable authenticator offered by Transmit Security. BindID uses FIDO-based biometrics for secure, frictionless, and consistent customer authentication. With one click to create new accounts or sign into existing ones, BindID eliminates passwords and the inconveniences of traditional credential-based logins.
Learn more about how you can boost your experiences with BindID.
BindID is a great solution for various use cases, including:
- Passwordless authentication for web and mobile applications.
- User authentication for call centers, IVR, and voice assistance.
- Frictionless new account opening.
- Secure verification for infrequent users.
Combining device-based FIDO biometrics with the OpenID Connect (OIDC) protocol, BindID provides a secure and easy-to-deploy authentication process that can be used for any app, in any channel.
Here's how it works:
- User performs an action that requires authentication (such as login).
- User executes an authentication process with BindID—which may also include registering to BindID, registering a strong authenticator (e.g., FIDO2 biometrics), and additional data verifications (e.g., SMS OTP).
- Upon successful authentication, you receive user metadata—which provides user profile info, provides trust indicators, and reflects all their known devices across all providers that use BindID.
- If needed, you perform your own additional authentication for the user (e.g., for new users), and report this back to BindID, along with a user alias that represents a user in your system.
Before you begin, you'll need to have an application configured in the BindID Admin Portal. From the application settings, obtain the client credentials and configure a redirect URI for this client that will receive the authentication result.
- Example CLIENT_ID:
XXXXXXX.XXXXXXXX.dev_6fa9320b.bindid.io"
(This is auto generated in the console) - Example REDIRECT_URI:
bindidexample://login
- CUSTOM_SERVER_URL: The BindId server that you work with. (Example:
signin.bindid-sandbox.io
), You can use the Sandbox/Production environment instead.
For more, see BindID Admin Portal: Get Started.
Please follow the Android Redirection setup to support deeplink in your app.
You need an access token to install packages, You can use a personal access token (PAT) to authenticate to GitHub Packages or the GitHub API.
-
Create a GitHub personal access token PAT
-
Authenticate by adding your personal access token to your ~/.npmrc file, edit the ~/.npmrc file for your project to include the following line, replacing TOKEN with your personal access token. Create a new ~/.npmrc file if one doesn't exist.
//npm.pkg.github.com/:_authToken=TOKEN
-
Add to the global
~/.npmrc
or the project level.npmrc
file the following line to route to Transmit Security packages on Github for installation.@transmitsecurity:registry=https://npm.pkg.github.com
Install the bindid-react-native package
# npm
$ npm install --save @transmitsecurity/bindid-react-native
# Yarn
$ yarn add @transmitsecurity/bindid-react-native
import XmBindIdSdk from '@transmitsecurity/bindid-react-native';
import type { XmBindIdServerEnvironment, XmBindIdConfig } from "@transmitsecurity/bindid-react-native/src/transmit-bind-id-api";
//...
const serverEnvironment: XmBindIdServerEnvironment = {
environmentMode: XmBindIdServerEnvironmentMode.Other,
environmentUrl: "CUSTOM_SERVER_URL"
};
/** You can use the sandbox server environment instead. */
// const serverEnvironment: XmBindIdServerEnvironment = {
// environmentMode: XmBindIdServerEnvironmentMode.Sandbox,
// environmentUrl: ""
// };
const config: XmBindIdConfig = {
clientId: "CLIENT_ID",
serverEnvironment: serverEnvironment
};
XmBindIdSdk.initialize(config)
.then((success: boolean) => {
console.log(`BindID initialize Completed: ${success}`);
}).catch((error: XmBindIdError) => {
console.log(`BindID initialized Failed: ${JSON.stringify(error)}`);
});
import XmBindIdSdk from '@transmitsecurity/bindid-react-native';
import type { XmBindIdAuthenticationRequest , XmBindIdResponse } from "@transmitsecurity/bindid-react-native/src/transmit-bind-id-api";
//...
const request: XmBindIdAuthenticationRequest = {
redirectUri: "REDIRECT_URI"
usePkce: true
};
XmBindIdSdk.authenticate(request)
.then((response: XmBindIdResponse) => {
console.log(`BindID Authentication Completed: ${JSON.stringify(response)}`);
//Handle the response by exchange token API to get the id_token, token_access ...
}).catch((error: XmBindIdError) => {
console.log(`BindID Authentication Failed: ${JSON.stringify(error)}`);
});
import XmBindIdSdk from '@transmitsecurity/bindid-react-native';
import type { XmBindIdAuthenticationRequest , XmBindIdResponse, XmBindIdTransactionSigningRequest, XmBindIdTransactionSigningDisplayData, XmBindIdTransactionSigningData } from "@transmitsecurity/bindid-react-native/src/transmit-bind-id-api";
//...
const displayData: XmBindIdTransactionSigningDisplayData = {
payee: "John Smith",
paymentAmount: "100$",
paymentMethod: "PayPal"
};
const transactionSigningData: XmBindIdTransactionSigningData = {
displayData: displayData
};
const request: XmBindIdTransactionSigningRequest = {
redirectUri: "YOUR_REDIRECT_URI",
transactionSigningData: transactionSigningData,
encrypted: true,
usePkce: true
};
XmBindIdSdk.signTransaction(request)
.then((response: XmBindIdResponse) => {
console.log(`BindID Sign Transaction Completed: ${JSON.stringify(response)}`);
//Handle the response by exchange token API to get the id_token, token_access ...
}).catch((error: XmBindIdError) => {
console.log(`BindID Sign Transaction Failed: ${JSON.stringify(error)}`);
});
import XmBindIdSdk from '@transmitsecurity/bindid-react-native';
import type { XmBindIdExchangeTokenResponse } from "@transmitsecurity/bindid-react-native/src/transmit-bind-id-api";
//...
XmBindIdSdk.exchangeToken("THE_RESPONSE_FROM_AUTHENTICATE_API/SIGN_TRANSACTION_API")
.then((response: XmBindIdExchangeTokenResponse) => {
console.log(`BindID Exchange Token Completed: ${JSON.stringify(response)}`);
//Handle the id_token by validate API
}).catch((error: XmBindIdError) => {
console.log(`BindID Exchange Token Failed: ${error.message}`);
});
Transmit Security, https://github.com/TransmitSecurity
This project is licensed under the MIT license. See the LICENSE file for more info.
Details
- bindid-react-native
- TransmitSecurity
- over 2 years ago
- MIT
- 25 dependencies
Assets
- bindid-react-native-1.0.0-npm.tgz
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0