WordPress Web3 Authentication Role Mapping

  • Role Mapping refers to assigning roles to users, based on the ownership of NFTs. Role Mapping in this context specifically refers to the ownership of NFTs mapped to different Wordpress Roles and the subsequent assignment of roles to the users relevant to these NFTs .

  • The admin can map which NFTs the user should own in order to obtain a specific WordPress role.

  • When a user logs in to WordPress using its Web3 Crypto Wallet, the user is assigned a role that is relevant to the NFTs that the user owns.

Step:1 Configure the NFTs

  • Open the Contract Address Config tab and click on Add Token Details button.

wordpress-web3-single-sign-on

  • Enter the valid details for your NFTs which you want to configure (Refer the below table) and click on Add button.

    Blockchain Choose appropriate blockchain for the NFT to be configured.
    Contract Address Name Add a relevant name
    Contract Address Enter the Contract Address of NFT Collection
    No.of Tokens Enter the minimum number of tokens the end user should hold.
    Token Ids (Optional) Enter specific Token Ids that user should have

    wordpress-web3-single-sign-on

  • Now, you will see that the nft deatils has been added to the list on the Contract Address Config tab .
    wordpress-web3-single-sign-on

Step:2 Add Role Mapping

  • Go to miniOrange Web3 Login >> Role mapping tab and enable the Role Mapping option it will mapped the user roles based NFTs he own.
    wordpress-web3-single-sign-on

    • Select the options you want to apply to the users and Choose the contract addresses to map to the WordPress role.

      Enter Contract Address Name This is toggle check to enable the NFT role mapping
      Keep existing user roles Existing Wordpress Users will not be assigned roles mapped in the role mapping configs
      Dont Disturb existing user roles New roles will be added to the existing roles for already logged in users.That is multiple roles will be added .
      Don't allow login User won't be logged in if they don't have any role/group mapped to their user profile
      Default Role This helps to give default role to the users who don't satisfy any criteria in roles mapped

wordpress-web3-single-sign-on

  • A role can have multiple contract addresses assigned to it and also user will be assigned that role if the user has any of those mapped contract addresses.
    wordpress-web3-single-sign-on

  • Select the Wordpress role to be assigned for those contract addresses.

    wordpress-web3-single-sign-on

  • Click on the Save Mapping button to add the Role Mapping Configuration.

    wordpress-web3-single-sign-on

  • You can also Delete specific Roles Mapped if they are no longer required .

  • Click on Add More Mapping in order to map other roles and repeat the above steps .

    wordpress-web3-single-sign-on

Contact us : If you have any questions, please email us at web3@xecurify.com