magiclabs / magic-admin-js

Magic admin Node.js SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.
https://docs.magic.link/admin-sdk/node-js
MIT License
75 stars 33 forks source link

getPublicAddress will always return the ETH public key #78

Closed bmeeder22 closed 1 year ago

bmeeder22 commented 2 years ago

✅ Prerequisites

🐛 Description

When attempting to verify a user is who they say that they are, we need to be able to verify that they're public keys are the same. If a token is generated for example with the SolanaExtension enabled we should be able to get the public address of the user for the solana blockchain. Right now the only available option is ETH. This applies to decode as well as getMetadataByPublicAddress.

🧩 Steps to Reproduce

  1. Generate a Did token using magic-js with SolanaExtension.
  2. Pass that to magic-admin and call magic.token.getPublicAddress(DidToken)
  3. See that the address is a ETH address (starts with 0x)

🤔 Expected behavior

getPublicAddress should return the users associated Solana Wallet Public Key

😮 Actual behavior

Returns the users ETH public key

💻 Code Sample

🌎 Environment

Software Version(s)
@magic-sdk/admin 1.3.4
Node 16.7
Operating System any
bmeeder22 commented 2 years ago

@harryEth Any updates on this?

ayv8er commented 2 years ago

@bmeeder22 This isn't a bug report, but it is a valid feature request. I'll be putting this under the attention of our Product team so we can add it to our roadmap.

ayv8er commented 1 year ago

This feature is now supported.