Created
August 3, 2020 16:37
-
-
Save alexastrum/dcc64204c8250223964d03758caefdc1 to your computer and use it in GitHub Desktop.
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
const customToken = await admin | |
.auth() | |
.createCustomToken(device.data.uid, { deviceId: device.id }); | |
const idTokenResponse = await axios.post<SignInWithCustomTokenResponse>( | |
"https://identitytoolkit.googleapis.com/v1/accounts:signInWithCustomToken?key=" + | |
WEBAPP_APIKEY, | |
{ token: customToken, returnSecureToken: true } | |
); | |
const idToken = idTokenResponse.data.idToken; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment