0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore: update translation of connector readmes (#6899)

This commit is contained in:
Charles Zhao 2024-12-20 18:24:55 +08:00 committed by GitHub
parent 0ba4d1d254
commit 2ade5d6289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 78 deletions

View file

@ -1,22 +1,21 @@
# 飞书网页
# Set up social sign-in with Feishu
先进企业协作与管理平台,一站式无缝办公协作,团队上下对齐目标,全面激活组织和个人。
Feishu Web: An advanced enterprise collaboration and management platform, offering seamless office collaboration and aligning team goals to fully activate organizations and individuals.
## 开始上手
## Getting started with Feishu social sign-in
飞书网页连接器是为桌面网页应用设计的。它采用了 OAuth 2.0 认证流程。
The Feishu web connector is designed for desktop web applications and uses the OAuth 2.0 authentication process.
## 注册飞书开发者账号
## Register a Feishu developer account
如果你还没有飞书开发者账号,请在 [开放平台](https://open.feishu.cn/?lang=zh-CN) 注册。
If you do not have a Feishu developer account, please register on the [Feishu Open Platform](https://open.feishu.cn/app).
## 创建应用
## Create an application
1. [开发者首页](https://open.feishu.cn/app?lang=zh-CN) 下方有 「创建企业自建应用」
2. 填写应用名称,选择「企业自建应用」,点击「创建应用」
3. 在左侧「安全设置中」添加相应的「重定向 URL」 `${your_logto_origin}/callback/${connector_id}`。其中 `connector_id` 在管理控制台添加了相应的连接器之后,可以在连接器的详情页中找到
4. 左侧「凭证与基本信息」中可以获取「AppID」、「AppSecret」
5. 左侧「应用发布」中需要发布第一个版本「AppID」、「AppSecret」才会生效
1. On the [Developer Console](https://open.feishu.cn/app), click "Create Custom App".
2. Fill in the application name, description, select an icon, and click "Create" button.
3. In the left sidebar, click "Security Settings", fill in the "Redirect URL" as `${logto_endpoint}/callback/${connector_id}`. The corresponding value can be found in the `Callback URI` field on the Feishu connector details page in the Logto Console.
4. In "Credentials & Basic Info", you can obtain the "App ID" and "App Secret".
> **Note**
> 应用不发布版本所获取的「AppID」、「AppSecret」 均无法使用,或请求错误。
> For non-enterprise internal use, you also need to click "Create a version" button in "Version Management and Release" page. The "App ID" and "App Secret" will only take effect after the application status changes to "Enabled."

View file

@ -2,83 +2,71 @@
The official Logto connector for Tencent short message service.
腾讯云短信服务 Logto 官方连接器 [中文文档](#腾讯云短信连接器)
**Table of contents**
- [Tencent short message service connector](#tencent-short-message-service-connector)
- [腾讯云短信连接器](#腾讯云短信连接器)
- [在腾讯云短信服务控制台中配置一个短信服务](#在腾讯云短信服务控制台中配置一个短信服务)
- [创建腾讯云账号](#创建腾讯云账号)
- [启用并配置腾讯云短信服务](#启用并配置腾讯云短信服务)
- [编写连接器的 JSON](#编写连接器的-json)
- [测试腾讯云短信连接器](#测试腾讯云短信连接器)
- [配置类型](#配置类型)
- [参考](#参考)
- [Get started](#get-started)
- [Set up a short message service in Tencent Cloud](#set-up-a-short-message-service-in-tencent-cloud)
- [Create an Tencent Cloud account](#create-an-tencent-cloud-account)
- [Compose the connector JSON](#compose-the-connector-json)
- [Test Tencent Cloud SMS connector](#test-tencent-cloud-sms-connector)
- [Config types](#config-types)
- [References](#references)
# 腾讯云短信连接器
## Get started
腾讯云是亚洲地区一个重要的云服务厂商,提供了包括短信服务在内的诸多云服务。
Tencent Cloud is a primary cloud service provider in Asia, offering various services, including SMS (short message service).
本连接器是 Logto 官方提供的腾讯云短信连接器,帮助终端用户通过短信验证码进行登录注册。
Tencent Short Message Service connector is an official Logto integration that helps end-users register or sign in using SMS verification codes.
## 在腾讯云短信服务控制台中配置一个短信服务
## Set up a short message service in Tencent Cloud
> 💡 **Tip**
>
> 你可以跳过已经完成的部分。
### Create an Tencent Cloud account
### 创建腾讯云账号
Go to the [Tencent Cloud website](https://cloud.tencent.com/) and register your account if you don't have one.
前往 [腾讯云](https://cloud.tencent.com/) 并完成账号注册。
1. Sign-in with your account at the [Tencent Cloud website](https://cloud.tencent.com/) and go to the [SMS service console page](https://cloud.tencent.com/product/sms).
2. Click the “Free Trial” (免费试用) button on the SMS service page and follow the setup steps.
3. Agree to the “Terms of SMS Service Activation” (短信开通服务条款) and click “Activate Service” (开通服务) to proceed.
4. On the “[SMS Console Overview](https://console.cloud.tencent.com/smsv2)” (短信服务控制台概览), choose “Domestic Messages”(国内消息) or “International/Hong Kong, Macao, Taiwan Messages”(国际/港澳台消息) from the sidebar based on your needs.
5. Add a signature and template for SMS messages. Note:
- When adding a “Signature” (签名), select “Verification Code” (验证码) under the "Applicable Scenarios" (模版类型) field.
- When adding a template, choose “Verification Code” as the template type.
- Include a placeholder `{1}` in the template content, which will be replaced by a randomly generated code.
- Templates with multiple placeholders are not supported. Use or create a single-placeholder template.
6. Submit the signature and template for approval. After submission:
- Wait for them to take effect.
- Test SMS can be sent from the “[SMS Console Overview](https://console.cloud.tencent.com/smsv2)” (短信服务控制台概览). Approved signatures and templates can be used directly for testing, or use the testing templates provided if they are still under review.
- Ensure your account has sufficient balance for testing and pre-register the test phone number to receive SMS successfully.
### 启用并配置腾讯云短信服务
For detailed guidance, click the “Getting Started Guide” (新手配置指引) tab in the SMS Console Overview.
1. 用刚刚在 [腾讯云](https://cloud.tencent.com/)
注册的账号登录并前往 [短信服务控制台](https://cloud.tencent.com/product/sms)。
2. 点按短信服务页面左上角的「免费试用」按钮并开始配置的流程。
3. 阅读并同意「短信服务开通条款」和「开通服务」以继续。
4. 你现在处于「[短信服务控制台概览](https://console.cloud.tencent.com/smsv2)」,根据你的用户场景,点击侧边栏中的「国内消息」或者「国际/港澳台消息」。
5. 跟随指引添加签名和模板,并提供相应的材料和信息以便审核:
- 注意:添加 **签名** 时要在「适用场景」栏选择「验证码」,添加 **模板**
时「模板类型」也要选择「验证码」,因为我们使用这些签名和模板的目的就是发送验证码。目前暂不支持除发送验证码之外的其它类型文字短信。
- 请同时注意要在模板的内容中加上 `{1}` 的占位符,其在实际发出的短信中会被随机生成的验证码所替代。
- 目前不支持 **多个** 占位符,请选择或创建仅有一个占位符的模板。
6. 提交了短信签名和模板的申请之后,需要等待它们生效。这时候我们可以回到 [短信服务控制台概览](https://console.cloud.tencent.com/smsv2)
发送测试短信。如果你的签名和模板都已经通过审核,你可以直接使用它们测试;如果它们还没有通过审核,腾讯云也提供了测试模板供使用。
- 在发送测试短信之前,你可能需要对账户进行小额的充值。
- 需要在测试前提前绑定测试所使用的手机号码以便成功收取测试短信。点击 [短信服务控制台概览](https://console.cloud.tencent.com/smsv2)
顶部栏目中的「新手配置指引」标签页以了解更多。
## Compose the connector JSON
## 编写连接器的 JSON
1. Go to the “[SMS Console Overview](https://console.cloud.tencent.com/smsv2)” and hover over your avatar in the top-right corner. Navigate to “Access Management > Access Keys > API Keys” to generate your `AccessKey ID` and `AccessKey Secret` after completing security verification. Please keep them properly.
2. From the “Domestic Messages” (国内消息) or “International/Hong Kong, Macao, Taiwan Messages” (国际/港澳台消息) tab, retrieve the “Signature Name” (签名名称) and “Template Code” (模版 CODCE).
- For testing templates, check the “Getting Started” (快速开始) tab under "Test-Exclusive Templates" (测试专用签名模版).
1. 前往 [短信服务控制台概览](https://console.cloud.tencent.com/smsv2)
,将鼠标悬停在页面右上角的头像处,进入「访问管理」并点按左侧「访问密钥」以及 「[API 密钥](https://console.cloud.tencent.com/cam/capi)
」。完成了安全验证之后你会得到一对「AccessKey ID」和「AccessKey Secret」请妥善保管它们。
2. 前往你之前访问过的「国内消息」或「国际/港澳台消息」标签页,可以很快找到「签名名称」和「模板 CODE」。
- 如果你想使用测试专用的签名模板, 则前往「快速开始」标签页,你就能在「测试专用签名模版」下方找到它们。
3. 完成腾讯云短信服务连接器的设置:
- 用你在步骤 1 中拿到的一对「AccessKey ID」和「AccessKey Secret」来分别填入 `accessKeyId``accessKeySecret`
- 用你在步骤 2 中拿到的「签名名称」填入 `signName` 栏。所有的模板都会共用这个签名。
- 你可以添加多个短信服务模板以应对不同的用户场景。这里展示填写单个模板的例子:
- `templateCode` 栏是你可以用来控制所发送短信内容的属性。它们的值从步骤 2 中的「模板 CODE」获取。
- `usageType` 栏填写 `Register``SignIn``ForgotPassword` 或者 `Generic` 其中之一以分别对应 _注册_
_登录__忘记密码__通用_ 的不同场景。(`usageType` 是 Logto 的属性,用来确定使用场景。)为了能够使用完成的流程,需要配置 `usageType``Register``SignIn`, `ForgotPassword` 以及 `Generic` 的模板。
- 在 [应用管理](https://console.cloud.tencent.com/smsv2/app-manage) 获取应用 ID 填写入 `sdkAppId` 栏。
- 在 [发送文档](https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8)
可以获取短信产品支持的地域,填写入 `region` 栏。
- Configure the Tencent Cloud SMS Connector with the following fields:
- `accessKeyId` and `accessKeySecret`: Use the credentials from step 1.
- `signName`: The signature name obtained in step 2. This applies to all templates.
- Add multiple templates for different scenarios if needed. Example for a single template:
- `templateCode`: Retrieved from the “Template Code” in step 2.
- `usageType`: Specify one of `Register`, `SignIn`, `ForgotPassword`, or `Generic` for different scenarios (Logto-specific property).
- Ensure templates are configured for all four scenarios to complete the flow.
- `sdkAppId`: Found in “[Application Management](https://console.cloud.tencent.com/smsv2/app-manage)” (应用管理).
- `region`: Specify the supported region from the “[Sending Documentation](https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8)” (发送文档).
### 测试腾讯云短信连接器
### Test Tencent Cloud SMS connector
你可以在「保存并完成」之前输入一个手机号码并点按「发送」来测试配置是否可以正常工作。
You can type in a phone number and click on "Send" to see whether the settings can work before "Save and Done".
大功告成!快去 [启用短信或邮件验证码登录](https://docs.logto.io/docs/recipes/configure-connectors/sms-connector/enable-SMS-sign-in/)
吧。
That's it. Don't forget to [Enable connector in sign-in experience](/connectors/sms-connectors#enable-phone-number-sign-up-or-sign-in).
### 配置类型
### Config types
| 名称 | 类型 |
|-----------------|------------|
| Name | Type |
| --------------- | ---------- |
| accessKeyId | string |
| accessKeySecret | string |
| signName | string |
@ -86,12 +74,11 @@ The official Logto connector for Tencent short message service.
| sdkAppId | string |
| templates | Template[] |
| 模板属性 | 类型 | 枚举值 |
|--------------|-------------|-------------------------------------------------------|
| templateCode | string | N/A |
| usageType | enum string | 'Register' \ | 'SignIn' \| 'ForgotPassword' \| 'Generic' |
| Template Properties | Type | Enum values |
| ------------------- | ----------- | ------------------------------------------------------- |
| templateCode | string | N/A |
| usageType | enum string | 'Register' \| 'SignIn' \| 'ForgotPassword' \| 'Generic' |
## 参考
- [腾讯云 如何实现短信验证码功能](https://cloud.tencent.com/document/product/382/43070)
## References
- [How to implement SMS verification code function?](https://cloud.tencent.com/document/product/382/43070)