5.5.2 • Published 25 days ago

expo-auth-session v5.5.2

Weekly downloads
5,960
License
MIT
Repository
github
Last release
25 days ago

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 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 expo package before continuing.

Add the package to your npm dependencies

npx expo install expo-auth-session expo-crypto

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.

6.0.0

25 days ago

5.5.2

7 months ago

5.5.1

7 months ago

5.5.0

7 months ago

5.4.0

11 months ago

5.3.0

1 year ago

5.2.2

1 year ago

5.2.1

1 year ago

5.2.0

1 year ago

5.1.1

1 year ago

5.1.0

1 year ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

4.1.0

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.7.4

2 years ago

3.7.3

2 years ago

3.7.2

2 years ago

3.8.0

2 years ago

3.7.1

2 years ago

3.7.0

2 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.4.2

3 years ago

3.4.1

3 years ago

3.4.0

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.2.0-beta.1

5 years ago

1.1.0

5 years ago

1.1.0-alpha.1

5 years ago

1.1.0-alpha.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago