Simple express app that demonstrates how to authenticate users in any messaging channel over Smooch.
APP_ID
: Smooch App ID
APP_KEY
: Smooch App Key
APP_SECRET
: Smooch App Secret
MONGODB_URI
: URI to a MongoDB Instance
The dotenv
package is in use so you can quickly set up an environment on your local machine by creating a .env
file.
This sample implements the requisite server components that are described in the Smooch Channel Transfer.
- Generate an auth code
- Send a message with a webview action to the user. Link the action to
https://YOUR_DOMAIN/login
and add theauthCode
as a query parameter to the link. - When the user logs in or signs up in that webview, their messaging channel account will be connected to their user record.