Skip to content

Instantly share code, notes, and snippets.

@cardoso
Created May 1, 2020 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardoso/95d575afba5ad51401d3a6805f2bdb3b to your computer and use it in GitHub Desktop.
Save cardoso/95d575afba5ad51401d3a6805f2bdb3b to your computer and use it in GitHub Desktop.
if(email && name) {
const streamId = Buffer.from(email).toString('base64').replace(/=/g, '@');
const userData = {streamId, email, name}
await storage.set(appleUid, userData);
console.log(`[INFO] User registered with email: ${email}. Derived streamId: ${streamId}`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment