Created
June 9, 2021 20:13
-
-
Save mars3142/baf148df2ee0ed3d3146341deb84660f to your computer and use it in GitHub Desktop.
create token
This file contains 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
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