DPO Radio

Free Website Privacy Check: Ensure Your Site's Compliant Now!

Install Guide on Web | AesirX SSO

Step-by-step guide:

Step 1: Create an AesirX Account

  • Visit https://signup.aesirx.io/.
  • If you don't have an AesirX account, click on the option to create one.
  • Enter your email address, choose a privacy ID, and select "Anti-brute Force Single Sign On" from the Solutions drop-down menu.
  • Enter your domain name and click "Verify" to submit your request.
  • Receive your license information and a confirmation email to finalize your account setup.

image5.png

Step 2: Download SSO

Download sso.js from https://github.com/aesirxio/sso/releases/latest

Step 3: Add file

Copy file sso.js to your project

Step 4: Enviroment

Add script to head

copy icon
<script>
  window.aesirxEndpoint="https://example.com"
  window.aesirxClientSecret="[REPLACE THIS WITH THE PROVIDED CLIENT_SECRET]"
  window.aesirxClientID="[REPLACE THIS WITH THE PROVIDED CLIENT_ID]"
  window.aesirxAllowedLogins=['concordium', 'metamask', 'regular']
</script>
<script async defer src="YOUR_PROJECT_PATH/sso.js"></script>

CLIENT_ID replace this with the provided SSO CLIENT ID from https://dapp.shield.aesirx.io/licenses

CLIENT_SECRET replace this with the provided SSO CLIENT_SECRET from https://dapp.shield.aesirx.io/licenses

aesirxAllowedLogins are for which logins do you want to use and you have wallets set up

  • concordium - Concordium wallet login
  • metamask - Metamask wallet login
  • regular - Regular login to your site

SSO Button

Create button with window.handleSSO()

copy icon
<script>
  const onGetData = async (response) => {
    //response is a Object that return from SSO, you can use it to handle Authentication in your Site
  };
  const onClickSSO = async () => {
    await window.handleSSO(onGetData);
  };
</script>
<button onclick="onClickSSO()"> SSO Login </button>
 

Enjoyed this read? Share the blog!