LogoLogo
ProductsCommunityGitHubShare Feedback
IDP Kit
IDP Kit
  • What is the IDP Kit?
    • Introduction
    • IDP Kit
      • IDP Kit | Basics
        • Overview
        • Functionality
      • Architecture
  • Getting started
    • Quick Start
    • CLI | Command Line Interface
    • REST APIs
    • Dependency (JVM)
    • Public deployments
    • Build
      • Docker
  • Demos
    • Try Login With NFT
  • Tutorials
    • Login with NFTs | Next.js
      • IDP Kit Setup
      • Client Registration
      • NFT Collection Configuration
      • Next.js
    • Login with NFTs | Keycloak
      • IDP Kit Setup
      • Client Registration
      • NFT Collection Configuration
      • Keycloak (18.0.2)
      • Keycloak (>19.0.1)
      • Frontend - Next.js
    • Login with SSI | Next.js
      • IDP Kit Setup
      • Client Registration
      • Verifiable Credential Config
      • Next.js
  • Configuration and Setup
    • IDP Kit configuration and setup
    • OIDC Manager configuration
      • Keys and signatures
      • Client registration
      • Client authentication
      • Claim configuration
    • SIOP Manager configuration
    • NFT Manager configuration
  • Concepts
    • OIDC Authentication - Recap
    • Identity provision via SSI
    • Identity provision via NFTs
      • EVM | Identity Provision
        • Sign in With Ethereum (SIWE)
      • Tezos | Identity provision via NFTs
        • Sign-In with Tezos (SIWT)
      • Near | Identity provision via NFTs
        • Sign-in with Near Protocol (SIWN)
      • Polkadot | Identity provision via NFTs
        • Sign-in with Polkadot (SIWP)
      • Flow | Identity provision via NFTs
        • Sign-in with Flow (SIWF)
      • Algorand | Identity provision via NFTs
        • Sign-in with Algorand (SIWA)
    • IAM / KeyCloak integration
  • Community
    • Discord
    • Twitter
    • Newsletter
    • GitHub Discussions
  • DEVELOPER RELATIONS
    • Contribute
    • Roadmap
    • Share Feedback
    • Contact
  • Product Editions
    • Open Source | Always Free
    • Enterprise
    • Cloud Platform
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Tutorials
  2. Login with NFTs | Next.js

NFT Collection Configuration

PreviousClient RegistrationNextNext.js

Last updated 1 year ago

Was this helpful?

Intro

We need to provide the chain and the NFT collection, which the IDP Kit must check, when users are trying to log in. The values can be set in the config/idp-config.json under default_nft_token_claim

Choose the ecosystem of where your NFT collection is hosted

"default_nft_token_claim": {
      "EVM": {
            "chain": "MUMBAI",
            "factorySmartContractAddress": "",
            "smartContractAddress": "0x3496756a84E186DC8C0d7ef91BcD393200ef5Ebc",
            "collectionPath": ""
          }
 }
"default_nft_token_claim": {
      "TEZOS": {
            "chain": "GHOSTNET",
            "factorySmartContractAddress": "",
            "smartContractAddress": "KT1Rc59ukgW32e54aUdYqVzTM9gtHrA4JDYp",
            "collectionPath": ""

          }
 }

We also need to configure other properties in the same file:

"externalUrl": "http://localhost:8080", 
"jsProjectExternalUrl":"http://localhost:3000"

NFT collection configuration example:

"default_nft_token_claim": {
      "NEAR": {
            "chain": "TESTNET",
            "factorySmartContractAddress": "",
            "smartContractAddress": "demo.khaled_lightency1.testnet",
            "collectionPath": ""
          }
 }

We also need to configure other properties in the same file:

"externalUrl": "http://localhost:8080", 
"jsProjectExternalUrl":"http://localhost:3000"

NFT collection configuration example:

"default_nft_token_claim": {
      "POLKADOT": {
            "chain": "OPAL",
            "factorySmartContractAddress": "",
            "smartContractAddress": "1062",
            "collectionPath": ""
          }
 }

We also need to configure other properties in the same file:

"externalUrl": "http://localhost:5000", 
"jsProjectExternalUrl":"http://localhost:4000"
"default_nft_token_claim": {
     "FLOW": {
            "chain": "TESTNET",
            "factorySmartContractAddress": "",
            "smartContractAddress": "0xa9ccb9756a0ee7eb",
            "collectionPath": "/public/exampleNFTCollection"
          }
 }

We also need to configure other properties in the same file:

"externalUrl": "http://localhost:8080", 
"jsProjectExternalUrl":"http://localhost:3000"
"default_nft_token_claim": {
       "ALGORAND": {
            "chain": "ALGORAND_TESTNET",
            "factorySmartContractAddress": "",
            "smartContractAddress": "GYFVJLKGSWQDHFBHBLABUXYHHSU544RV3WH4ZCF3S6HONSDP73TK4VGY3Y",
            "collectionPath": ""
        }
 }

In the "smartContractAddress": You should provide the asset Creator Account

Now that we have finished the configuration, we need to rebuild the project for the changes to take effect, run the API and connect our client to it.

  1. Rebuild the project

./gradlew build install

2. Expose the API

idpkit run
  1. Rebuild image

docker build --rm -t waltid/idpkit .

2. Expose the API

idpkit run