Embed Website Toolbox Forum with SSO

Hi, could use some help… I want to embed a Website Toolbox Forum onto a Softr custom code page and manage SSO so that the user’s Softr sign-in also logs them into the Forum, supplying their email, full name, and (maybe) avatar image from the Users Base in Airtable.

Website Toolbox supports SSO using SAML and OpenID but I have a Pro account not Business so can’t use those.

Alternatively, Website Toolbox has a nice support page on their SSO API to use token-based authentication to automatically log users into the Forum. But I don’t know enough to implement it. Here are their instructions:
https://www.websitetoolbox.com/support/single-sign-on-token-based-authentication-241

To start, I can almost see passing the Softr user to the Forum in the first step, would be a custom code block on the Softr sign-in page, parsing a URL with USER as window[‘logged_in_user’][‘softr_user_email’] and another URL parameter as window[‘logged_in_user’][‘softr_user_full_name’]:

HTTP Request to Website Toolbox SSO API:
https://FORUM_DOMAIN/register/setauthtoken?type=json&apikey=APIKEY&user=USER

(to be done with curl I suppose)

But then the second step, “Parse the JSON returned by the HTTP Request to get the authentication token and user ID and then store it in a cookie or your database” is beyond me, although I can imagine somehow storing the token in the User Base in Airtable.

And then I can almost make sense of the next step, to log the user into the Forum with the token, except how to access AUTHTOKEN from somewhere within Softr (accessing Airtable presumably)?

Support instruction: add AUTHTOKEN into the Embed Code in the custom code block that accesses the Forum, or alternatively, "you can add the following HTML IMG tag to your “log in successful” landing page:

img src="//FORUM_DOMAIN/register/dologin?authtoken=AUTHTOKEN&remember=REMEMBER" border=“0” width=“1” height=“1” alt=""

Sorry, I don’t know JS much but have done a lot of successful programming anyway with basic cut-and-paste. Seems like it should be pretty simple here.

Besides Website Toolbox, any other ideas as to a good embedded-code Forum app for Softr?

Hey @EricM,

SSO cannot be setup if you are not subscribed to Business plan. If you get the users’ login details without native integration that would be a security branch on Softr side.

However, I can see that you talked to my colleague via chat and he offered an alternative solution.

Let me know if you need further assistance.