2

In web2 we usualy create a bearer token when authentificating the user, and then use this bearer token in every api call.

In web3, since the authentification is made with a wallet (connection), the only thing i have is a wallet address, which is public data.

How can i securely get a bearer token from my backend for a user after wallet connect event ?

Edit: I would like, if possible, to avoid signing a message for UX reason

1 Answer 1

3

You can still use a bearer token, your wallet sign-in just replaces the username/password login in your flow. Once the user authenticates their credentials you can issue them a token as you would when they authenticate with any other third-party auth service.

The user has to sign something to prove the connected wallet is theirs, you can't avoid that requirement. However, you can avoid interacting with the blockchain and have the user sign an off-chain message, like sign-in-with-solana does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.