kristoferlund / ic-siwe

SIWE, Sign in with Ethereum for ICP, the Internet Computer. Build cross chain Ethereum apps on ICP!
https://shtr2-2iaaa-aaaal-qckva-cai.icp0.io
MIT License
20 stars 12 forks source link

Add/runtime feature uri #5

Closed kristoferlund closed 8 months ago

kristoferlund commented 8 months ago

Adds "runtime features" as a way to custiomize the behaviour of ic-siwe. First added feature is IncludeUrlInSeed.

IncludeUriInSeed

Default: Not enabled

When enabled, the URI is included in the seed used to generate the principal. Defaults to Not enabled. Including the URI in the seed does not add any additional security in a scenario where ic_siwe_provider is deployed and configured to serve only one domain. However, if the ic_siwe library is used in a custom canister, that delegates identities for more than one domain, it is recommended to enable this feature to ensure that the principal is unique for each domain.

  runtime_features = opt vec { \
    variant { IncludeUriInSeed } \
  };