diff --git a/chat/authentication.mdx b/chat/authentication.mdx index 5857f8c..7fcdaee 100644 --- a/chat/authentication.mdx +++ b/chat/authentication.mdx @@ -53,3 +53,18 @@ 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.