How to configure secure mode authentication?
If you have enabled secure mode in your Engagespot app, you should generate a JWT Token for your Bubble users from your Workflow, and then save it in the User
data.
Provide your private secret signing key to the Bubble plugin
- Generate and download the Private Signing Key from your Engagespot console.
- Copy the contents from the private-key-file.
- Open any tool (like this) that can do
Base64 Encode
of your private key. (Make sure to choose the scheme asUTF-8
) - Copy the Base64 Encoded string of your private key.
- Paste it in the
OPTIONAL-SIGNING-KEY-BASE64
field in the Engagespot Bubble configuration page.
Generate JWT token for Bubble users.
For every Bubble user, you must generate a JWT token, and sign it using the secret signing key. We've made it easy for you to do it with our Generate User Token
action that you can find in your Bubble workflow.
Usually, it's best to generate the token during the User is logged in
event.
Build the workflow for User is logged in
action as follows -
-
Use the
Generate User Token
action from Engagespot plugin. And chooseCurrent User
. This step will generate a signed JWT Token. -
Now, we need to attach the JWT Token generated in the previous step to our
User
->engagespot_user_token
field. If the field doesn't exist inUser
type, create it. Now, Use theMake changes to the current user
action provided by Bubble. Set the value ofengagespot_user_token
of current user to the value generated from previous step. -
Done! You have now successfully generated and attached a user token for your Bubble user. Now, Engagespot bubble plugin will use this token to authenticate all requests with this token.