react-native-sf-authentication-session

0.1.1 • Public • Published

react-native-sf-authentication-session

Getting started

$ npm install react-native-sf-authentication-session --save

Mostly automatic installation

$ react-native link react-native-sf-authentication-session

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-sf-authentication-session and add RNSFAuthenticationSession.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSFAuthenticationSession.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

import RNSFAuthenticationSession from 'react-native-sf-authentication-session';
 
...
// The url you want to open with safari
const url = "http://my.webapp.com"
// The url your server will redirect you to
// hint - use a custom schema or universal link to immediatly get back to your app
const callbackUrl = "myapp://"
// The redirected url with query params containing private data
// ex - "myapp://token=mysecrettoken"
const finalUrl = await RNSFAuthenticationSession.getSafariData();

Package Sidebar

Install

npm i react-native-sf-authentication-session

Weekly Downloads

2

Version

0.1.1

License

none

Unpacked Size

14.7 kB

Total Files

10

Last publish

Collaborators

  • jeandecampredon