Created
May 1, 2020 17:44
-
-
Save cardoso/a578332666d43a3ee6f18274a300af78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userData = await storage.get(appleUid); | |
if (!userData) { | |
console.log(`[ERROR] User not found in persistent storage.`); | |
res.sendStatus(404); | |
return; | |
} | |
const response = { | |
apiKey, | |
streamId: userData.streamId, | |
streamToken: streamClient.createToken(userData.streamId), | |
email: userData.email, | |
name: userData.name | |
} | |
console.log(`[INFO] User signed in successfully with response: ${JSON.stringify(response)}.`); | |
res.send(response); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment