These are some excerpts adapted from the Nextauth example.
Getting started
- Grab your Knock Client Secret Key. Replace every line break with
\n
and wrap it in JSON (see example). Store this in the environment variableKNOCK_SIGNING_KEY
. Be sure to not let this variable be public. - Grab your Knock public key for the environment. Store it in
NEXT_PUBLIC_KNOCK_PUBLIC_API_KEY
. - Grab the ID of the channel you want to surface in the in-app feed. Store it in
NEXT_PUBLIC_KNOCK_FEED_ID
- Update the
session
callback in your nextauth code to set theknockToken