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:
parent
2f3c9ae4fd
commit
ec0e92d44c
3 changed files with 35 additions and 2 deletions
|
@ -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)
|
||||
|
|
BIN
packages/connector-alipay-native/docs/add-framework.png
Normal file
BIN
packages/connector-alipay-native/docs/add-framework.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue