question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow account restoration like Maniverse

See original GitHub issue

Hi @soapdog,

I just verified, that I could use a single identity across multiple devices [although the docs say, this isn’t possible: https://www.scuttlebutt.nz/faq/applications/multiple-devices].

I managed to figure that out with the help of @staltz!

Manyverse asks you for an account recovery option on initial load. After digging into the GitLab repository I’ve learned about a toWords invocation. Searching the repository for it led me to its implementation.

So if you manage to get ssb-keys-mnemonic shipped, you can generate a backup for other apps to use!

The code would look around these lines:

const path = require('path')
const fs = require('fs')

const mnemonic = require('ssb-keys-mnemonic')

const secret = path.join(process.env.HOME, '.ssb', 'secret')
fs.readFile(secret, 'utf8', function (error, content) {
  if (error) {
    console.error(error)
    return
  }
  // Somehow strip the comments now. Then
  const keys = JSON.parse(content)
  const words = mnemonic.keysToWords(keys)
  console.log(words)
})

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
soapdogcommented, Nov 5, 2019

@Ryuno-Ki,

On running the same identity on multiple devices

it is not safe to run the same identity in multiple devices. The only people running multiple devices are either doing that by running sbot on a VPS and connecting to it from multiple devices, or, doing it with alternate identities which are not their main identity.

Running on multiple devices will break your feed. it is almost impossible to do it safe because all messages are signed and include the signature for the previous message in the chain, so if you have the same identity in two machines and they are not up to date with each other (quite common in our protocol) then you will end up posting from one device before it caught up with your other device causing it to use the same sequence number and the same signature of a previous message but a different content. This is what we call forking a feed and then peers will start reject peering with your identity. Your messages will stop propagating to peers who have the other identity and you will end up having to create a totally new identity, that previous one will be forked and unrecoverable. This is a big no no.

On identity recovery

The act of moving an identity to a new device is common, you upgrade your machine for example and need to move your data. That is safe because you’re not posting from the old machine anymore, you just wait for the data to sync and there you go.

It is not possible to do that from patchfox because patchfox doesn’t have access to the filesystem. We can’t write the files needed to restore an identity from a WebExtension.

The good news is that I am working on a self-contained app to do just that.

Conclusion

So this issue is not really applicable to patchfox because patchfox is just a client, it doesn’t contain the server part that handles accounts and running on multiple devices is anti-pattern and dangerous and something that all the core developers really tell you not to do.

1reaction
soapdogcommented, Nov 5, 2019

@Ryuno-Ki people are working on a whole new site.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Twitter account restoration – Twitter age requirements
Restoring your account if you signed up for Twitter when under 13 years old. Twitter requires people using the service to be 13...
Read more >
Your account is disabled - Google Account Help
Ask us to restore your account. If you own the account, you can request access to it again. Sign in to your Google...
Read more >
Set up an account recovery contact - Apple Support
An account recovery contact can help make sure that you always have access to your account, even if you forgot your Apple ID...
Read more >
Help with the Microsoft account recovery form
Improve your chances to successfully recover your account by reading through the following guidance first. Important: The account recovery form can only be...
Read more >
Restore Definition & Meaning - Merriam-Webster
The meaning of RESTORE is give back, return. How to use restore in ... renew, restore, refresh, renovate, rejuvenate mean to make like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found