Skip to content

Instantly share code, notes, and snippets.

@Tsugami
Created July 15, 2021 21:33
Show Gist options
  • Save Tsugami/6fbce9990ebca4f160cb3796e92e9bca to your computer and use it in GitHub Desktop.
Save Tsugami/6fbce9990ebca4f160cb3796e92e9bca to your computer and use it in GitHub Desktop.
FIREBASE REST AUTH
const FIREBASE_API_KEY = process.env.FIREBASE_API_KEY;
const FIREBASE_EMAIL = process.env.FIREBASE_EMAIL;
const FIREBASE_PASSWORD = process.env.FIREBASE_PASSWORD;
const FIREBASE_AUTH_URL = `https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=${ FIREBASE_API_KEY }`;
const method = "POST"
const body = {
email: FIREBASE_EMAIL,
password: FIREBASE_PASSWORD,
returnSecureToken: true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment