orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 116 forks source link

Use a Yubikey to login #86

Open haadcode opened 8 years ago

haadcode commented 8 years ago

With the uPort integration, Orbit will have a notion of identities and has a default identity provider (orbit). It'd be cool if orbit's identity provider could use a Yubikey to sign and verify a login not unlike uPort does with the QR codes and mobile app.

There's a module for Node.js that we can use https://www.npmjs.com/package/yubikey

More developer resources and documentation at https://developers.yubico.com/

jbenet commented 8 years ago

👍

we'll also want a way to store profile data that's standard, and works with all id providers. is that already tracked in the orbit-db log or are you using uport?

haadcode commented 8 years ago

@jbenet do you mean standard way of presenting the user profile (similar to POST)?

At the moment the user profile data is normalized within Orbit:

// uPort
profileData = {
  name: uportProfile.name,
  location: uportProfile.residenceCountry,
  image: uportProfile.image && uportProfile.image.length > 0 ? uportProfile.image[0].contentUrl.replace('/ipfs/', '') : null,
  signKey: pubKeyHash,
  updated: new Date().getTime(),
  identityProvider: {
    provider: uPortIdentityProvider.id,
    id: persona.address
  }
}

// orbit
profileData = {
  name: credentials.username,
  location: 'Earth',
  image: null,
  signKey: pubKeyHash,
  updated: null,
  identityProvider: {
    provider: OrbitIdentityProvider.id,
    id: null
  }
}

I'm in the process of turning that into a data structure (class in this case).

is that already tracked in the orbit-db log or are you using uport?

Do you mean like a log of all user profiles that go through Orbit, so that you have a database of all users? This doesn't currently happen, but would be trivial to add (security aside).