Skip to content

React Native Azure B2C Auth using pure JS. This doesn't require ejecting from Expo.

License

Notifications You must be signed in to change notification settings

curtisgibeaut/ad-b2c-react-native

 
 

Repository files navigation

codecov

Note

This repo was forked from the original ad-b2c-react-native repository. The fork was made to fix peer dependency version issues and to expose the user access token via the useToken hook.

Introduction

React Native Azure AD B2C solution using Pure JS. If you are using expo you don't need to eject.

Thanks to https://github.com/sonyarouje/react-native-ad-b2c and https://github.com/wkh237/react-native-azure-ad packages for the inspiration.

Feel free to contribute or sponsor. :)

Note: The version 2.X is not compatible with 1.X version. For 1.x docs, visit https://www.npmjs.com/package/ad-b2c-react-native -> Versions

Contribute

Create a fork and after cloning locally, do following

  1. Yarn install

  2. Create packages/b2c-sample/env/config.js with following

    export default config = {
      authTenant: "<B2CTenantID>",
      authAppId: "<B2CAppID>",
    };
    
  3. Add your changes to packages/lib

  4. Run packages/b2c-sample to do runtime test, by

    //cmd in root folder
    
    yarn start
    
    //for more options: root -> package.json -> scripts
    

Installation

Don't forget to install peer dependencies "expo-web-browser": ">=10.1.0", "react": ">=17.0.1"

npm i azure-ad-b2c-react-native -S

API

View here

About

React Native Azure B2C Auth using pure JS. This doesn't require ejecting from Expo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.3%
  • TypeScript 29.6%
  • HTML 0.1%