Skip to content

Commit

Permalink
Add email verification docs (#146)
Browse files Browse the repository at this point in the history
* Add email verification docs

* Mention emailHash
  • Loading branch information
DLeyland authored Dec 3, 2024
1 parent 0e4e1cd commit 3fcf174
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions chat/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,20 @@ Plain.init({
},
});
```

## Customer verification

If you want to see the name and email of customers who get in touch via chat you can require them to provide their details
by setting `requireAuthentication` to true in Plain init:

```typescript
Plain.init({
requireAuthentication: true
});
```

When enabled, any customer getting in touch will first be presented with a form allowing them to enter their name and email address.

The customer will then receive a verification code to that email which they can enter to start a chat.

If an `emailHash` is already set in `customerDetails`, then the verification screen will not appear since the customer has already been authenticated.

0 comments on commit 3fcf174

Please sign in to comment.