# Is it possible to sign an arbitrary message with sdk?

**URL:** <https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042>\
**Category:** ⚙️ Flow SDKs\
**Created:** [February 25, 2021, 6:32am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042 "2021-02-25T06:32:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![avcd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/avcd/32/790_2.png) [@avcd](https://forum.flow.com/u/avcd)\
**Post date:** [February 25, 2021, 6:32am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/1 "2021-02-25T06:32:36Z")

</div>

Can we do something like web3’s personal sign to verify the identity of the person? (Using javascript sdk or go sdk)

---

<div class="post-metadata">

**Author:** ![pete](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/pete/32/191_2.png) [@pete](https://forum.flow.com/u/pete)\
**Post date:** [February 25, 2021, 7:42am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/2 "2021-02-25T07:42:07Z")

</div>

Yep, Flow has something similar to this.

Here’s an example from the Go SDK: [flow-go-sdk/main.go at master · onflow/flow-go-sdk · GitHub](https://github.com/onflow/flow-go-sdk/blob/master/examples/user_signature/main.go)

The user can sign an arbitrary message that is then verified on-chain. That same message could also be verified off-chain – the verifier would just need to query the matching account public key.

---

<div class="post-metadata">

**Author:** ![avcd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/avcd/32/790_2.png) [@avcd](https://forum.flow.com/u/avcd)\
**Post date:** [February 25, 2021, 7:49am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/3 "2021-02-25T07:49:37Z")

</div>

@pete Thanks for the answer! I see. Is this only for the Go SDK?  
Can we also have the user sign in using Blocto wallet in the browser?

---

<div class="post-metadata">

**Author:** ![pete](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/pete/32/191_2.png) [@pete](https://forum.flow.com/u/pete)\
**Post date:** [February 25, 2021, 7:53am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/4 "2021-02-25T07:53:10Z")

</div>

Not yet ☹ We’ll need to make this functionality available in FCL in order to enable wallets. But before we can do that, we need to update transaction signatures to use a domain prefix so that they can be distinguished from “personal” signatures.

What’s your use case if you don’t mind me asking?

---

<div class="post-metadata">

**Author:** ![avcd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/avcd/32/790_2.png) [@avcd](https://forum.flow.com/u/avcd)\
**Post date:** [February 25, 2021, 7:56am UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/5 "2021-02-25T07:56:56Z")

</div>

I see.

With Ethereum Dapps, it’s easy to create a login mechanism by signing with MetaMask, so I thought it would be nice if the same thing could be done with Flow Dapps.

---

<div class="post-metadata">

**Author:** ![Gianni-PopMint](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/gianni-popmint/32/282_2.png) [@Gianni-PopMint](https://forum.flow.com/u/Gianni-PopMint)\
**Post date:** [February 25, 2021, 2:25pm UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/6 "2021-02-25T14:25:11Z")

</div>

> [@avcd](#):
>
> Ethereum Dapps

I hope on FLOW we find ways to remove this need, systems like meta mask where a user needs to install an extension is cumbersome for the general population. We need to build more UX experiences like top shots.

@pete I was emailing with the dapper team and they mentioned that the Dapper wallet would be available soon. Will login mechanisms be capable, could you provide some more insight into how the dapper wallet works? is it like a traditional integration?

---

<div class="post-metadata">

**Author:** ![qvvg](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/qvvg/32/78_2.png) [@qvvg](https://forum.flow.com/u/qvvg)\
**Post date:** [February 26, 2021, 7:21pm UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/7 "2021-02-26T19:21:47Z")

</div>

This will be a thing in FCL in the future, it is fairly high on our list of things, but we have a blocker we need to work around so it unfortunately wont be a thing particularly soon.

It will be part of the fcl current user system and will probably look something like this:

```javascript
// this is not a thing yet
await fcl.currentUser().sign("thing to sign")
// similar to the authz functionality it may even make sense to have it as a highlevel alias
await fcl.sign("thing to sign")

// the signature that comes back will most likely be what we already call a composite signature
{
  address: "0x ____",
  keyId: 0,
  signature: " _________" // hex representation of binary signature
}

```

We are working with the node devs to unblock this, and are in the process of working with FCL wallet providers to enable this from their side. It should be fairly straightforward to implement once we are unblocked.

---

<div class="post-metadata">

**Author:** ![avcd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/avcd/32/790_2.png) [@avcd](https://forum.flow.com/u/avcd)\
**Post date:** [February 27, 2021, 3:10pm UTC](https://forum.flow.com/t/is-it-possible-to-sign-an-arbitrary-message-with-sdk/1042/8 "2021-02-27T15:10:16Z")

</div>

@qvvg Thank you for explaining the exact situation to me.  
I understand that the API of the current node needs to be changed, and node operators have to update it 💦
