Skip to content

Authorising with magic.link #302

@owengot

Description

@owengot

In the javascript documentation there are examples of authenticating users with MetaMask and 3Box - I am wondering how to go about doing this with magic.link? Going by the 3box example, I would generate a private key and convert it to a string, magic.link then offers an endpoint to generate an ID Token - so I have ended up with this:

const identity = await PrivateKey.fromRandom()
const identityString = identity.privKey.toString()
const idToken = await magic.user.generateIdToken({ attachment: identityString });

however the return ID payload, after base64 decode, does not resemble the private key originally generated. In this case it looks something like 0xd05f8c5d1d81818f77538579bff1c944acf3165b606c19a11e8086d36eca739e0c96ad19eaacbe435352b18672023062698b22723677ff8bf87355d4e104d1281b

Would appreciate any advice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions