FormidableLabs/react-native-app-auth
概要
AppAuth向けのReact Nativeブリッジ。OAuth2プロバイダーと通信するSDKです。
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -2
- 1か月
- -3
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナル
React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
This version supports React Native 0.86+, iOS 15.1+, Android API 24+, and Expo SDK 57+ with development builds. Use the 8.x release line for older React Native applications.
For Expo SDK 57 apps using iOS scenes, enable ios.enableSceneSupport with expo-build-properties. Expo SDK 58 and later include scene support, so they do not need it. See the Expo setup guide for the complete configuration.
React Native bridge for AppAuth-iOS and AppAuth-Android SDKS for communicating with OAuth 2.0 and OpenID Connect providers.
This library should support any OAuth provider that implements the OAuth2 spec.
We only support the Authorization Code Flow.
Check out the full documentation here!
Tested OpenID providers
These providers are OpenID compliant, which means you can use autodiscovery.
- Identity Server4 (Example configuration)
- Identity Server3 (Example configuration)
- FusionAuth (Example configuration)
- Google (Example configuration)
- Okta (Example configuration)
- Keycloak (Example configuration)
- Azure Active Directory (Example configuration)
- AWS Cognito (Example configuration)
- Asgardeo (Example configuration)
- Microsoft (Example configuration)
Tested OAuth2 providers
These providers implement the OAuth2 spec, but are not OpenID providers, which means you must configure the authorization and token endpoints yourself.
- Uber (Example configuration)
- Fitbit (Example configuration)
- Dropbox (Example configuration)
- Reddit (Example configuration)
- Coinbase (Example configuration)
- GitHub (Example configuration)
- Slack (Example configuration)
- Strava (Example configuration)
- Spotify (Example configuration)
- Unsplash (Example configuration)
- Imgur (Example configuration)
Why you may want to use this library
AppAuth is a mature OAuth client implementation that follows the best practices set out in
RFC 8252 - OAuth 2.0 for Native Apps including using
ASWebAuthenticationSession and SFSafariViewController on iOS, and
Custom Tabs on
Android. WebViews are explicitly not supported due to the security and usability reasons
explained in Section 8.12 of RFC 8252.
AppAuth also supports the PKCE ("Pixy") extension to OAuth which was created to secure authorization codes in public clients when custom URI scheme redirects are used.
To learn more, read this short introduction to OAuth and PKCE on the Formidable blog.
Contributing
Please see our contributing guide.
The demo is a Yarn workspace. Install dependencies from the repository root with
Yarn 1.22.22; the root yarn.lock also resolves the local library for the demo.
Running the iOS app
After cloning the repository, run the following:
cd react-native-app-auth
yarn install --frozen-lockfile
cd examples/demo
(cd ios && pod install)
npx react-native run-ios
Running the Android app
After cloning the repository, run the following:
cd react-native-app-auth
yarn install --frozen-lockfile
cd examples/demo
npx react-native run-android
Notes
- You have to have the emulator open before running the last command. If you have difficulty getting the emulator to connect, open the project from Android Studio and run it through there.
- ANDROID: When integrating with a project that utilizes deep linking (e.g. React Navigation deep linking), update the redirectUrl in your config and the
appAuthRedirectSchemevalue in build.gradle to use a custom scheme so that it differs from the scheme used in your deep linking intent-filter as seen here.
Example:
// build.gradle
android {
defaultConfig {
manifestPlaceholders = [
appAuthRedirectScheme: 'io.identityserver.demo.auth'
]
}
}
Maintenance Status
Active: Nearform is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
関連プロジェクトを探す
読み込み中…