Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-auth-session

Package Overview
Dependencies
Maintainers
21
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-auth-session

Expo module for browser-based authentication

  • 1.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77K
decreased by-18.93%
Maintainers
21
Weekly downloads
 
Created
Source

expo-auth-session

AuthSession is the easiest way to implement web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of expo-web-browser.

API documentation

Installation in managed Expo projects

For managed managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the react-native-unimodules package before continuing.

Add the package to your npm dependencies

expo install expo-auth-session

Configuration

To use this module, you need to set up React Native deep linking in your application. For more information, check out React Native documentation.

Add support for React Native deep linking
  • Android:

    Add intent filter and set the launchMode of your MainActivity to singleTask in AndroidManifest.yml:

    <activity
        android:name=".MainActivity"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <!-- Accepts URIs that begin with "example://gizmos” -->
            <data android:scheme="example"
                android:host="gizmos" />
        </intent-filter>
    

    For more information about the available configuration, check out Android documentation.

  • iOS:

    Add following lines to your AppDelegate.m:

    #import <React/RCTLinkingManager.h>
    
    // iOS 9.x or newer
    - (BOOL)application:(UIApplication *)application
                openURL:(NSURL *)url
                options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
    {
        return [RCTLinkingManager application:application openURL:url options:options];
    }
    
    // iOS 8.x or older
    - (BOOL)application:(UIApplication *)application
                openURL:(NSURL *)url
      sourceApplication:(NSString *)sourceApplication
             annotation:(id)annotation
    {
        return [RCTLinkingManager application:application openURL:url
                        sourceApplication:sourceApplication annotation:annotation];
    }
    

    Add following lines to Info.plist:

    <dict>
        ...
        <key>CFBundleURLTypes</key>
        <array>
            <dict>
                <key>CFBundleURLName</key>
                <string>gizmos</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>example</string>
                </array>
            </dict>
        </array>
    </dict>
    

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

Keywords

FAQs

Package last updated on 23 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc