Skip to content

Instantly share code, notes, and snippets.

@mars3142
Created June 9, 2021 20:13
Show Gist options
  • Save mars3142/baf148df2ee0ed3d3146341deb84660f to your computer and use it in GitHub Desktop.
Save mars3142/baf148df2ee0ed3d3146341deb84660f to your computer and use it in GitHub Desktop.
create token
async function sendToken(res: Response, username: string) {
const token = await auth().createCustomToken(username);
res.status(200).json({
data: {
username: username,
token: token,
},
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment