| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 1 month ago | ||
| 15 hours ago | ||
| 15 hours ago |
React Native App Auth Example
本目录的鸿蒙 Demo 使用 React Native 0.82.1 / React 19.1.1 / RNOH 0.82.30,并通过 file:.. 安装本仓 AppAuth 8.5.1 开发包。
先在仓库根目录执行 npm install、npm run codegen-lib,设置 DEVECO_STUDIO_HOME 后执行 npm run build:har。然后进入本目录执行 npm install 和 npm run dev,使用 DevEco Studio 打开 harmony 编译。真机安装需自行配置签名。
完整配套版本、HAR 构建和 example_auto 用例说明见仓库 README。以下 Android/iOS 说明来自原示例,不属于本次鸿蒙构建验证范围。

Running the iOS app
After cloning the repository, run the following:
cd react-native-app-auth/examples/demo
yarn
(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/examples/demo
yarn
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'
]
}
}