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

@brightlayer-ui/react-native-auth-workflow

v7.0.0

Published

Re-usable workflow components for Authentication and Registration within Eaton applications.

Downloads

9,246

Readme

React Native Auth Workflow

Build npm (scoped) codecov

The React Native Auth Workflow package provides a consistent UI implementation of authentication-related capabilities for use in Eaton web applications built with React Native.

The package is intended to provide a standard, out-of-the-box experience for capabilities such as:

  • Okta Login
  • Login
  • Forgot / Reset Password
  • Change Password
  • Contact Support
  • Self Registration
  • Invitation-based Registration

This package is flexible, allowing you to use the Login and Registration flows independently or in combination (or simply use individual screen components), while also providing many opportunities to customize the flows if needed for your particular application.

These workflows are back-end agnostic, meaning you can use them with any back-end API you wish. You simply need to provide an implementation for several key functions (actions) that are called at various points within the workflows based on user interaction.

Installation

To install the latest version of this package, run:

npm install --save @brightlayer-ui/react-native-auth-workflow
// or
yarn add @brightlayer-ui/react-native-auth-workflow

Compatibility

This package has a peer dependency on React Native Paper.

  • @brightlayer-ui/react-native-auth-workflow @1.x --> react-native-paper @3.x
  • @brightlayer-ui/react-native-auth-workflow @2.x --> react-native-paper @4.x
  • @brightlayer-ui/react-native-auth-workflow @4.x --> react-native-paper @5.x

Peer Dependencies

This package also has a number of peer dependency requirements that you will need to install in your project. To install the latest version of all of these peer dependencies, run the following command in your project root:

npm install --save @brightlayer-ui/react-native-components @brightlayer-ui/react-native-vector-icons @okta/okta-react-native i18next react react-i18next react-native react-native-gesture-handler react-native-keyboard-aware-scroll-view react-native-pager-view react-native-paper react-native-reanimated react-native-safe-area-context react-native-svg react-native-svg-transformer react-native-vector-icons react-native-webview
// or
yarn add @brightlayer-ui/react-native-components @brightlayer-ui/react-native-vector-icons @okta/okta-react-native i18next react react-i18next react-native react-native-gesture-handler react-native-keyboard-aware-scroll-view react-native-pager-view react-native-paper react-native-reanimated react-native-safe-area-context react-native-svg react-native-svg-transformer react-native-vector-icons react-native-webview

Usage

To use the package, read our Integration instructions. Even if you are starting from scratch, it may be useful for you to refer to the Example project while getting started.

In short, you will need to:

  • Add routes for each of the Login Workflow screens you wish to include
  • Define a mechanism for tracking the authenticated state of the current user
  • Add a registration route for the registration workflow component
  • Configure route guards / protected routes to ensure users only have access to specific routes when appropriate
  • Define actions files to integrate the workflow screens with your back-end API

If you are starting a brand new project, the easiest way to get started with the React Native Auth Workflow is to use the BLUI CLI and select the Authentication template as your starting point. This will create a brand new project that exactly mirrors the example project from this repository.

Learn More

Migrating from v5 => v6

We have listened to your feedback and version 5 of this library is a significant rewrite that aims to address many requests for greater flexibility and customization of the workflows.

Some notable changes include:

  • Router independence — you now have full control over your routing library and its configuration
  • Allowing you to manage the authentication status / mechanism (separating UI from business logic)
  • Separation of Login and Registration workflows so they can be used independently
  • Allow for re-ordering or adding/removing screens from workflows (utility components available to help you match our styling in custom screens)
  • Exporting screens individually so you can build your own custom flows
  • Simpler approach to translations (separating our internal translations from your application-level translations)
  • Greater customization of screens through props (and moving customization properties to the screens they affect instead of handling all customizations through a monolithic wrapper component)
  • Improved error management mechanism (customizable)

Learn more about upgrading your existing application by reading our Migrating Guide

Contributors

To work on this package as a contributor, first clone down the repository:

git clone https://github.com/etn-ccis/blui-react-native-workflows
cd react-native-workflows/login-workflow

You can install all necessary dependencies and run the demo project by running:

yarn start:example
// or
yarn start:example-android

If you make changes to the library components and want to link them to the running example project, you can run:

yarn link:components

You can build the library by running:

yarn build

You can run the Lint checks, prettier formatter, typescript validator, and unit tests by running:

yarn validate

You can update the auto-generated licenses.md file by running:

yarn generate:licenses