samuelgozi / firebase-firestore-lite

A lightweight cloud firestore library for the browser
MIT License
210 stars 12 forks source link

this works? #80

Open flourigh opened 4 weeks ago

flourigh commented 4 weeks ago
    const Auth = require("firebase-auth-lite")
    const auth = new Auth({
        apiKey: "AIzaSyB2U020k1a9t5aBcds68eKe_nzAwDPz7rw",
    })

    const { Database } = require("firebase-firestore-lite")
    const db = new Database({
        projectId: "poj-es",
        auth,
    })

    const shrink = db.ref("shrink/1cef8654aed6e72")
    const doc = await shrink.get()

    return new Response(JSON.stringify({
    referer: request.headers.get("referer"),
        doc,
  }), {
    headers: { "content-type": "application/json" },
  })

this code show "Auth2 is not a constructor"

and this code

    const { Database } = require("firebase-firestore-lite")
    const db = new Database({
        projectId: "poj-es",
    })

    const shrink = db.ref("shrink/1cef8654aed6e72")
    const doc = await shrink.get()

    return new Response(JSON.stringify({
    referer: request.headers.get("referer"),
        doc,
  }), {
    headers: { "content-type": "application/json" },
  })

return "insufficient permission" but, in rules, i allow if true

helpme?

flourigh commented 3 weeks ago

This not work if AppCheck enabled TT.TT, i've disable app check and work normally, how use it with app check enabled?