Coder Social home page Coder Social logo

amandeepmittal / bi-sdk-react-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gobeyondidentity/bi-sdk-react-native

0.0 2.0 0.0 2.36 MB

React Native SDK for Beyond Identity Passkeys

Home Page: https://developers.beyondidentity.com

License: Apache License 2.0

Shell 0.05% JavaScript 0.84% Ruby 0.74% C 0.03% Objective-C 29.71% Java 2.05% Kotlin 2.73% TypeScript 15.88% Objective-C++ 45.40% Swift 2.57%

bi-sdk-react-native's Introduction


Beyond Identity

Universal Passkeys for Developers

All devices. Any protocol. Zero shared secrets.

Beyond Identity React Native SDK

License

Embedded SDK

Goodbye, passwords! The Beyond Identity SDK for React Native is a wrapper around our Native Embedded SDKs (Android and iOS), which allows you to embed the Passwordless experience into your product. Users will not need to download the Beyond Identity Authenticator. This SDK supports OIDC and OAuth2.

Installation

  1. Install the SDK:
yarn add @beyondidentity/bi-sdk-react-native

or

npm install @beyondidentity/bi-sdk-react-native
  1. Update Native Requirements in your ios/android folders:

Please make sure your iOS project supports "minimum deployment target" 13.0 or later.

In your ios/Podfile set:

platform :ios, '13.0'

Go to your ios folder and run:

 pod install

Make sure your android/build.gradle supports minSdkVersion 26 or later

buildscript {
  ext {
    minSdkVersion = 26
  }
}

Add the following maven url to your repositories in your android/build.gradle

allprojects {
  repositories {
    maven {
      url "https://packages.beyondidentity.com/public/bi-sdk-android/maven/"
    }
  }
}

Using expo

โš ๏ธ This package cannot be used in "Expo Go" because it requires custom native code. However you can leverage this library with a development build or prebuild.

  1. Install the SDK:
expo install @beyondidentity/bi-sdk-react-native
  1. Add the SDK config plugin to the plugins array of your app.{json,config.js,config.ts}:
{
  "expo": {
    "plugins": [
      ["@beyondidentity/bi-sdk-react-native"],
    ]
  }
}
  1. Set native requirments either with expo-build-properties or modify project static files

A. Modify the following static files

android/gradle.properties

android.minSdkVersion=26

ios/Podfile.properties.json

"ios.deploymentTarget": "13.0"

or

B. Add expo-build-properties to your app.{json,config.js,config.ts}:

expo install expo-build-properties
{
  "expo": {
    "plugins": [
      ["@beyondidentity/bi-sdk-react-native"],
      [
        "expo-build-properties",
        {
          "android": {
            "minSdkVersion": 26
          },
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ]
  }
}
  1. Next, rebuild your app as described in the "Adding custom native code" guide.

Usage

Check out the Developer Documentation and the SDK API Documentation for more information.

Setup

First, before calling the Embedded functions, make sure to initialize the SDK. This can be done where you register your root component.

import { Embedded } from '@beyondidentity/bi-sdk-react-native';

Embedded.initialize(
  biometricAskPrompt: string,
  allowedDomains?: string[]
): Promise<Success>;

You may also add a listener to log native events with Embedded.logEventEmitter after initializing.

Example App

Clone the following repo and use the available comands to see the SDK in action!

To set up (run this first):

yarn bootstrap

To run the example app on Android:

yarn example android

To run the example app on iOS:

yarn example ios

To start the packager:

yarn example start

bi-sdk-react-native's People

Contributors

nmelo avatar turnipdabeets avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.