Skip to content

Commit

Permalink
chore: added documentation to connector
Browse files Browse the repository at this point in the history
  • Loading branch information
srs committed May 16, 2024
1 parent 39e018a commit 1d873f2
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/connectors/connector-postmark/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @logto/connector-postmark

## 1.0.0

### Patch Changes

- Initial implementation.
60 changes: 59 additions & 1 deletion packages/connectors/connector-postmark/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# Postmark connector

TODO: Work in progress.
Logto connector for Postmark email service.

## Get started

Postmark is a mail platform for transactional and marketing email. We can use its email sending function to send a _verification code_.

## Register Postmark account

Create a new account at [Postmark website](https://postmark.com/). You may skip this step if you've already got an account.

## Configure your connector

Fill out the `serverToken` field with the Server Token you find under settings for your
server in Postmark.

Fill out the `fromEmail` field with the senders' _From Address_.

In order to enable full user flows, templates with usageType `Register`, `SignIn`, `ForgotPassword` and `Generic` are required

Here is an example of Postmark connector template JSON.

```jsonc
[
{
"usageType": "Register",
"templateAlias": "logto-register"
},
{
"usageType": "SignIn",
"templateAlias": "logto-sign-in"
},
{
"usageType": "ForgotPassword",
"templateAlias": "logto-forgot-password"
},
{
"usageType": "Generic",
"templateAlias": "logto-generic"
},
]
```

## Test Postmark email connector

You can type in an email address and click on "Send" to see whether the settings can work before "Save and Done".

That's it. Don't forget to [Enable connector in sign-in experience](https://docs.logto.io/docs/tutorials/get-started/passwordless-sign-in-by-adding-connectors#enable-sms-or-email-passwordless-sign-in)

## Config types

| Name | Type |
|-------------|-------------------|
| serverToken | string |
| fromEmail | string |

| Template Properties | Type | Enum values |
|---------------------|-------------|------------------------------------------------------|
| usageType | enum string | 'Register' \| 'SignIn' \| 'ForgotPassword' \| 'Generic' |
| templateAlias | string | N/A |
2 changes: 1 addition & 1 deletion packages/connectors/connector-postmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@logto/connector-postmark",
"version": "0.0.1",
"version": "1.0.0",
"description": "Postmark connector implementation.",
"author": "Sten Sandvik <stenrs@gmail.com>",
"dependencies": {
Expand Down

0 comments on commit 1d873f2

Please sign in to comment.