react-native-safari-web-auth

Authentication helper for react-native projects using ASWebAuthentication. iOS 12+ only.

Usage no npm install needed!

<script type="module">
  import reactNativeSafariWebAuth from 'https://cdn.skypack.dev/react-native-safari-web-auth';
</script>

README

react-native-safari-web-auth

One-time login authentication for iOS 12+ using ASWebAuthenticationSession.

Getting started

$ npm install react-native-safari-web-auth --save

Installation

$ react-native link react-native-safari-web-auth

Usage

import SafariWebAuth from "react-native-safari-web-auth";
import {Platform} from "react-native";


if (Platform.OS !== "ios" && parseInt(Platform.Version, 10) >= 12) {
    SafariWebAuth.requestAuth(`https://your.site.com/auth`);
}

Should be used in conjunction with a custom URL scheme for your app that handles the login callback.