SuperAPI AI 工具集

ping-orchestration-react-native-sdk

前端与建站

查看项目

更新于 10-16 03:42

技能介绍

用途:该技能指导在 React Native 应用中集成 Ping Identity React Native SDK(npm 作用域 @ping-identity),可新建项目或向已有项目添加文件,支持三种流程:Journey(原生应用内 UI,面向 PingAM / PingOne AIC)、OIDC Web(浏览器登录,任意 OIDC 提供方)、Journey + OIDC 并存(以 FlowPicker 为入口)。

主要能力:无参数调用时进入向导模式,依次询问意图(脚手架/添加到现有应用/浏览参考指南)、流程类型、Journey 回调处理方式(managed 用 useJourneyForm,manual 仅用 useJourney)、回调层级(basic/standard/full)、配置参数(clientId、redirectUri、discoveryEndpoint、scopes,Journey 另需 serverUrl、realm、cookieName、journeyName)及输出路径。可分析用户提供的 Journey 导出 JSON 以识别回调并预填 journeyName 与 callbackTier。生成内容包含品牌主题 PingTheme、各回调视图组件、CallbackRenderer、LoginScreen、HomeScreen、客户端文件与 App.tsx 导航栈,并按层级给出安装命令。

使用方式:按向导回答即可;脚手架模式先执行 npx @react-native-community/cli@latest init <AppName> --directory <outputDir>/<AppName>,再写入模板并运行对应 npm install 命令(如 Journey Basic 需 @ping-identity/rn-core@1.0.0、@ping-identity/rn-journey@1.0.0 及 React Navigation 相关包)。

限制:redirectUri 必须使用自定义 scheme,discoveryEndpoint 须为 https 且以 /.well-known/openid-configuration 结尾,scopes 须含 openid,serverUrl 须为 https 且无结尾斜杠;callbackMode 无法从导出推断,必须询问。资料未提供收费、价格、平台支持范围与效果说明。