pmusaraj / react-native-safari-web-auth

React Native library for iOS login authentication via ASWebAuthenticationSession.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

React Native library for iOS login authentication via ASWebAuthenticationSession.

License:MIT License


Languages

Language:Objective-C 75.8%Language:Ruby 19.9%Language:JavaScript 4.3%