diff --git a/packages/connector-alipay-native/README.md b/packages/connector-alipay-native/README.md index 8374d7c13..6da901db7 100644 --- a/packages/connector-alipay-native/README.md +++ b/packages/connector-alipay-native/README.md @@ -35,6 +35,39 @@ Alipay Native connector works closely with Logto SDK on mobile platforms. It tak | privateKey | string | N/A | | signType | enum string | 'RSA' \| 'RSA2' | +## Enable Alipay native sign-in in your app + +### iOS + +We assume you have integrated [Logto iOS SDK](https://docs.logto.io/docs/recipes/integrate-logto/ios) in your app. In this case, things are pretty simple, and you don't even need to read the Alipay SDK doc: + +**1. Add `LogtoSocialPluginAlipay` to your Xcode project** + +Add the framework: + +![Add framework](/packages/connector-alipay-native/docs/add-framework.png) + +> ℹ️ **Note** +> +> The plugin includes Alipay "minimalist SDK" (极简版 SDK). You can directly use `import AFServiceSDK` once imported the plugin. + +**2. Add the plugin to your `LogtoClient` init options** + +```swift +let logtoClient = LogtoClient( + useConfig: config, + socialPlugins: [LogtoSocialPluginAlipay(callbackScheme: "your-scheme")] +) +``` + +Where `callbackScheme` is one of the [custom URL Schemes](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) that can navigate to your app. + +### Test Alipay native connector + +That's it. Don't forget to [Enable connector in sign-in experience](https://docs.logto.io/docs/tutorials/get-started/enable-social-sign-in#enable-connector-in-sign-in-experience). + +Once Alipay native connector is enabled, you can build and run your app to see if it works. + ## References - [Alipay Docs - Access Preparation - How to create an app](https://opendocs.alipay.com/support/01rau6) diff --git a/packages/connector-alipay-native/docs/add-framework.png b/packages/connector-alipay-native/docs/add-framework.png new file mode 100644 index 000000000..cdc4f0331 Binary files /dev/null and b/packages/connector-alipay-native/docs/add-framework.png differ diff --git a/packages/connector-wechat-native/README.md b/packages/connector-wechat-native/README.md index 131519c20..4188a0e36 100644 --- a/packages/connector-wechat-native/README.md +++ b/packages/connector-wechat-native/README.md @@ -28,7 +28,7 @@ The official Logto connector for WeChat social sign-in in native apps (iOS and A - [平台信息](#平台信息) - [等待审核结果](#等待审核结果) - [编写连接器的 JSON](#编写连接器的-json) - - [在你的应用中启用微信原生连接器](#在你的应用中启用微信原生连接器) + - [在你的应用中启用微信原生登录](#在你的应用中启用微信原生登录) - [iOS](#ios-1) - [Android](#android-1) - [测试微信原生连接器](#测试微信原生连接器) @@ -360,7 +360,7 @@ Once WeChat native connector is enabled, you can build and run your app to see i } ``` -## 在你的应用中启用微信原生连接器 +## 在你的应用中启用微信原生登录 ### iOS