WalletConnect / WalletConnectFlutterV2

WalletConnect v2 client made in Dart for Flutter.
https://pub.dev/packages/walletconnect_flutter_v2
Apache License 2.0
117 stars 61 forks source link

Sign in with Ethereum AuthRequestParams - guidance for domain and aud? #101

Closed bobwith2bees closed 1 year ago

bobwith2bees commented 1 year ago

Working with the Auth feature to sign in, is there any guidance on how to populate the aud and domain fields for a mobile DAPP where the wallet could be on another device?

The README has localhost, so while that is not user friendly it is straightforward to prove you are on the same device. That won't work when more than one device is involved. Does the package actually open port 3000 on localhost? (how are conflicts managed?)

Feel free to point me to the correct forum/github discussions for this. I am trying to understand if I need to host some service at a known URL and relay the request to the wallet to support the auth feature.

Reference:

AuthRequestParams(
        aud: 'http://localhost:3000/login',
        domain: 'localhost:3000',
Luzzotica commented 1 year ago

I do not believe you need to host anything at the provided url to be able to authenticate.

The purpose of the aud and domain is to allow the website to determine if you have authenticated with them properly. That the token has the appropriate audience, and was targeting the proper domain.

You should be able to make that happen anywhere, with any URL, witthout of having an actual website backing it up. Mobile apps for example could still use the domain and audience, and still validate the token.