0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

docs(connector-alipay-native): iOS SDK guide (#1334)

* docs(connector-alipay-native): iOS SDK guide

* docs(connector-alipay-native): sdk note
This commit is contained in:
Gao Sun 2022-07-01 13:09:22 +08:00 committed by GitHub
parent 2f3c9ae4fd
commit ec0e92d44c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 2 deletions

View file

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -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