fcl-js icon indicating copy to clipboard operation
fcl-js copied to clipboard

Pass user email to wallet

Open vasu5235 opened this issue 2 years ago • 1 comments

Issue To Be Solved

fcl.logIn() does not take any input params, logged in users need to write email address again while connecting to wallet (example: connecting blocto wallet).

(Optional): Suggest A Solution

Something like fcl.logIn(email="[email protected]") would allow to pass user's email from session tokens providing a better UX

(Optional): Context

We are developing a PoAP app for pre-authorized users. Each user logs in using a special token and mints the PoAP during which they need to connect their blocto wallet. We are using fcl.logIn() api to do this but since it does not consume any input parameters, user's have to write their email once again during the wallet connection.

vasu5235 avatar Oct 12 '22 15:10 vasu5235

@vasu5235 I agree this would provide some nice UX, but there are a couple concerns as well which (I think have been reasons for not going forward with this in the past):

  • Not all wallets use email. In fact, many users prefer not to use wallets that require email in web3
  • What if the email one is logged into with the dapp is different than the one used with the wallet
  • There is no guarantee if we implemented this that all wallets would do the work to support it (if they supported email), so there might be confusion from developers on why it's not working when it only works some of the time

Curious to hear from some of wallets in the community on this.

chasefleming avatar Oct 12 '22 19:10 chasefleming

Thank you for your thoughts. I'm going to close this for now. If you can make a broader case for why this might be helpful feel free to re-open it. Generally providing a mechanism for sending arbitrary data to the wallet (like user data) will cause a "coupling" of dapps to wallets which we would like to avoid.

justinbarry avatar Nov 29 '22 01:11 justinbarry