Sitefinity Custom 2FA Authentication
sitefinity | NET, CMS, Sitefinity | 2021-05-20
sitefinity | NET, CMS, Sitefinity | 2021-05-20
Only tested in V12.x
/Sitefinity/Administration/ProfileTypes -> Basic Profile
Add a custom field – AuthCode (ShortText) in user profile
Go to /Sitefinity/Administration/Settings/Advanced
a. Authentication -> Authentication protocol -> set to SimpleWebToken
b. Security -> RelyingParties -> Add a new record, and state the realm=”(host)”, key can be exactly same as the default localhost’s key.
c. Security -> SecurityTokenIssuers -> Add a new record, and state the realm=”(host)”, key can be exactly same as the default localhost’s key.
<system.identityModel.services>
<federationConfiguration>
<wsFederation passiveRedirectEnabled="true" issuer="http://<host>/wsauth/authenticate/swt" realm="http://<host>" requireHttps="false" />
<cookieHandler requireSsl="false" />
</federationConfiguration>
</system.identityModel.services>
Restart Sitefinity.
Go to /Sitefinity, it will route you to the sample login screen
Make fields configurable, such as: – custom field name – email template
Make it work in all Sitefinity version (Currently tested in v12.2)