npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cybavo/react-native-auth-service

v1.0.80

Published

React version of CYBAVO AUTH SDK

Downloads

3

Readme

CYBAVO Auth SDK

React-native version of CYBAVO Ayth SDK. Learn more on our website: https://www.cybavo.com/

image image image

Getting started

Install dependency

$ npm install @cybavo/react-native-auth-service --save

Link native modules (before React Native 0.60)

  • React Native >= 0.60

    React Native 0.60 introduced autolinking, manual linking should not be necessary

  • React Native < 0.60

    $ react-native link @cybavo/react-native-auth-service

Setup native SDK repository

Android

Edit android/build.gradle to setup CYBAVO private maven repository

allprojects {
    repositories {
        // other repositories...
        // add CYBAVO private maven repository
        maven {
            url {CYBAVO_MAVEN_REPO_URL}
            credentials {
                username = {CYBAVO_MAVEN_REPO_USRENAME}
                password = {CYBAVO_MAVEN_REPO_USRENAME}
            }
        }
    }
}

iOS

  1. Append this line in Podfile:

    source 'https://bitbucket.org/cybavo/specs_501.git' if using Xcode 10.2.1, Xcode 10.3

    source 'https://bitbucket.org/cybavo/specs_512.git' if using >= Xcode 11.2

  2. Go to ./ios, run pod install to install all dependencies.

  3. Open ./ios/{{your project}}.xcworkspace in XCode

  4. In XCode, run your project (Cmd+R)<

Upgrade SDK

Upgrade React-Native SDK

yarn upgrade @cybavo/react-native-auth-service

Since React-Native SDK is built upon native SDKs, you may need to upgrade native SDKs by the following method:

  • Android

    Gradle has a cache mechanism so it may not always upgrade native dependency to latest version. Run the following command when necessary to force Gradle to upgrade Android native dependency to latest.

    cd android; ./gradlew assembleDebug --refresh-dependencies
  • iOS

    $ cd ios
    $ rm -rf Podfile.lock
    $ pod update

Usage

import { createAuthenticator } from '@cybavo/react-native-auth-service';

// create Authenticator instance
const authenticator = createAuthenticator(SERVICE_ENDPOINT, SREVICE_API_CODE);

// pair device
authenticator.pair(...);
// observe pairing state
authenticator.addPairingStateListener(pairings -> {
  // update pairing list
});
// fetch 2-FA actions
authenticator.getTwoFactorAuthentications(...)
  .then(actions => {
    // display actions
  });
// approve 2-FA action
authenticator.approve(...);
// reject 2-FA action
authenticator.reject(...);
// unpair devices
authenticator.unapir([deviceId]);

Check documents of individual module for detail usage

Sample app

Check our sample app on GitHub: https://github.com/CYBAVO/auth-sdk_react-native_example