Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

400
Visualizações
Cannot access Firebase Storage with or without authentication (web)

I want to use Firebase Storage (web version 9.6.0) but the access to Firebase Storage is being denied with the following error:

unhandledRejection: FirebaseError: Firebase Storage: User is not authenticated, please authenticate using Firebase Authentication and try again. (storage/unauthenticated)

You would want to say to me that I just need the user to be authenticated, but two problems:

  • the user is already authenticated (getAuth().currentUser returns something)

  • the rules in Firebase Storage don't say that a user needs to be authenticated:

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read: if true;
      allow write: if request.auth != null;
    }
  }
}

The problem is caused when I try this:

// initializeApp(config) etc.

const storage = getStorage() // enabled in Firebase console
const a_correct_path = "something..."
const reference = ref(storage, a_correct_path) // this is working (I get the right reference)
const url = getDownloadURL(reference) // this throws the error

NOTE: Because I have already had problems with it, please not that I'm using App Check which I have enforced for the Storage feature.

Why did I do wrong?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Firstly, The

const a_correct_path = ""

Can't be empty and should have the correct path if it's in a folder.

But if that doesn't help... Reset your storage rules to the first one.

If that doesn't work, check the line where you imported things from firebase

about 4 years ago · Juan Pablo Isaza Relatório

0

On the Firebase Console, go to Authentication. Check that the user that you are logged in with appears there. If the user is not there then that means you are not authenticating users with Firebase Authentication, and maybe you're just adding users to your Firestore. That is why the error is placing emphasis on Firebase Authentication.

User is not authenticated, please authenticate using Firebase Authentication and try again.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda