0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-04-07 23:01:25 -05:00

docs(connector-aliyun-dm): add Aliyun DM README.md (en-US) (#1263)

This commit is contained in:
Darcy Ye 2022-06-30 00:01:55 +08:00 committed by GitHub
parent 427adc892a
commit 38b8e5b095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 120 additions and 6 deletions

View file

@ -1,2 +1,75 @@
### Aliyun DM README
placeholder
### Aliyun direct mail connector
Aliyun is a primary cloud service provider in Asia, offering many cloud services, including DM (direct mail). Aliyun DM Connector is a plugin provided by the Logto team to call the Aliyun DM service APIs, with the help of which Logto end-users can register and sign in to their Logto account via mail verification code (or in other words, passcode).
## Register Aliyun account
Go to the [Aliyun website](https://cn.aliyun.com/) and register your Aliyun account if you don't have one.
## Enable and configure Aliyun Direct Mail
Go to the [DM service console page](https://www.aliyun.com/product/directmail) and sign in. Enable the Direct Mail service by clicking the _Apply to enable_ button on the top left of the page and begin the configuration process.
Starting from the [DM admin console page](https://dm.console.aliyun.com/), you should:
1. Go to _Email Domains_ from the sidebar and add _New Domain_ following the instructions.
2. Customize _Sender Addresses_ and _Email Tags_ respectively.
After finishing setup, there are two different ways to test:
- Go to the [DirectMail Overview page](https://dm.console.aliyun.com/), find _Operation Guide_ at the bottom of the page, and click on _Send Emails_. You will find all the different kinds of testing methods.
- Follow the path _Send Emails_ -> _Email Tasks_ in the sidebar to create a testing task.
## Compose the connector JSON
1. From the [DM admin console page](https://dm.console.aliyun.com/), hover on your avatar in the top right corner and go to "AccessKey Management", and click "Create AccessKey". You will get an "AccessKey ID" and "AccessKey Secret" pair after finishing security verification. Please keep them properly.
2. Go to the **Sender Addresses** or **Email Tags** tab you just visited from the [DM admin console page](https://dm.console.aliyun.com/), you can find "Sender Address" or "Email Tag" easily.
3. Fill out the Aliyun DM Connector settings:
- Fill out the `accessKeyId` and `accessKeySecret` fields with access key pairs you've got from step 1.
- Fill out the `accountName` and `fromAlias` field with "Sender Address" and "Email Tag" which were found in step 2. All templates will share this signature name.
- You can add multiple DM connector templates for different cases. Here is an example of adding a single template:
- Fill out the `subject` field, which will work as title of the sending email.
- Fill out the `content` field with arbitrary string-type contents. Do not forget to leave `{{code}}` placeholder for random passcode.
- Fill out `usageType` field with either `Register`, `SignIn` or `Test` for different use cases.
Here is an example of Aliyun DM connector config JSON.
```json
{
"accessKeyId": "<your-access-key-id>",
"accessKeySecret": "<your-access-key-secret>",
"accountName": "<noreply@logto.io>",
"fromAlias": "<logto>",
"templates": [
{
"subject": "<register-template-subject>",
"content": "<Logto: Your passcode is {{code}}. (regitser template)>",
"usageType": "Register"
},
{
"subject": "<sign-in-template-subject>",
"content": "<Logto: Your passcode is {{code}}. (sign-in template)>",
"usageType": "SignIn"
},
{
"subject": "<test-template-subject>",
"content": "<Logto: Your passcode is {{code}}. (test template)>",
"usageType": "Test"
},
]
}
```
### Config types
| Name | Type |
|-----------------|------------|
| accessKeyId | string |
| accessKeySecret | string |
| accountName | string |
| fromAlias | string |
| templates | Template[] |
| Template Properties | Type | Enum values |
|---------------------|-------------|----------------------------------|
| subject | string | N/A |
| content | string | N/A |
| usageType | enum string | 'Register' \| 'SignIn' \| 'Test' |

View file

@ -1,4 +1,4 @@
# Aliyun Short Message Service
# Aliyun short message service connector
Aliyun is a primary cloud service provider in Asia, offering many cloud services, including SMS (short message service). Aliyun SMS Connector is a plugin provided by the Logto team to call the Aliyun SMS service, with the help of which Logto end-users can register and sign in to their Logto account via SMS verification code (or in other words, passcode).
@ -19,7 +19,7 @@ Go to the [Aliyun website](https://cn.aliyun.com/) and register your Aliyun acco
- You may need to recharge a small amount of money before sending test messages.
- You may also be asked to bind a test phone number before sending test messages. For more details, go to "Quick start" tab from the sidebar of the [SMS service console page](https://dysms.console.aliyun.com/overview).
## Set up Aliyun SMS Connector settings
## Compose the connector JSON
1. From the [SMS service console page](https://dysms.console.aliyun.com/overview), hover on your avatar in the top right corner and go to "AccessKey Management", and click "Create AccessKey". You will get an "AccessKey ID" and "AccessKey Secret" pair after finishing security verification. Please keep them properly.
2. Go to the "Domestic Messages" or "International / Hong Kong, Macao and Taiwan Messages" tab you just visited, you can find "Signature Name" and "Template Code" easily.
@ -30,5 +30,46 @@ Go to the [Aliyun website](https://cn.aliyun.com/) and register your Aliyun acco
- Fill the `templateCode` field, which is how you can control SMS context, with "Template Code" from step 2.
- Fill out `usageType` field with either `Register`, `SignIn` or `Test` for different use cases.
Here is an example of Aliyun SMS connector config JSON.
```json
{
"accessKeyId": "<your-access-key-id>",
"accessKeySecret": "<your-access-key-secret>",
"signName": "<Aliyun>",
"templates": [
{
"templateCode": "<SMS_123456>",
"usageType": "Register"
},
{
"templateCode": "<SMS_234567>",
"usageType": "SignIn"
},
{
"templateCode": "<SMS_345678>",
"usageType": "Test"
},
]
}
```
### Config types
| Name | Type |
|-----------------|------------|
| accessKeyId | string |
| accessKeySecret | string |
| signName | string |
| templates | Template[] |
| Template Properties | Type | Enum values |
|---------------------|-------------|----------------------------------|
| templateCode | string | N/A |
| usageType | enum string | 'Register' \| 'SignIn' \| 'Test' |
## References
- [Aliyun SMS - Quick Start](https://dysms.console.aliyun.com/quickstart)

View file

@ -1,4 +1,4 @@
# Facebook
# Facebook connector
The Facebook connector provides a concise way for your application to use Facebook's OAuth 2.0 authentication system.

View file

@ -1,4 +1,4 @@
# Github
# Github connector
The GitHub connector enables users to have access to your application using their own GitHub accounts via GitHub OAuth 2.0 authentication protocol.