Open thepiwo opened 4 months ago
@michele-franchi converted this to an issue to properly add some comments:
CAIP-122: Sign in With X (SIWx) defines a standard protocol with which arbitrary chains can use a keypair-signature based login mechanism, this is purely off chain, based on and compatible with SIWE
The standard doesn't include any specification regarding wallet connection. This siwe-oidc repository uses another package to fullfill the Ethereum wallet connection part, then uses the SIWE protocol to get the users signature for login purposes and wraps this to be used with the OIDC server protocol for generic login use.
So there is 3 parts to the login flow
The referenced SIWx repository provides a wrapper for different blockchains to provide the signature (flow 2.) and provides example implementations for select wallet interactions (not generic as we need, flow 3.). Overall probably more serving as an example for developers rather than a maintained ready-to-be-used software.
@michele-franchi so my recommendation on what to implement would be the following.
for now we can keep using this already working siwe-oidc provider and use it as is. When we decide what other chain to integrate we should
then in later steps if we have one or multiple addional chains implemented we can also move the SIWE provider to use our commonly shared new provider, then eventually run multiple separate provider deployment of the same code (different config for different chain) or one shared provider deployment to connect to all chains.
also attaching our previous discussion on this for the record here:
Evaluate if SIWx can be a good choice to handle the authentication with different blockchains.
Useful resources: