balsimpson / alexa-radio-skill

An Alexa Skill that lets you create and customize a personal playlist of audio streams that can be easily managed through a web page. Listen to your favourite radio streams or audiobook by saying, Alexa, ask juke box to play some blues.
https://alexa-radio-skill.vercel.app
2 stars 3 forks source link

Firebase DB #3

Closed freqq68 closed 4 months ago

freqq68 commented 10 months ago

Hello @balsimpson

I get this image

I dunno if it's me i'm wrong or is it completly broken ...

here how Iv'e read the credetials

image

thks

balsimpson commented 10 months ago

Hey sorry. I've not updated this in a long time.

HammyHavoc commented 5 months ago

@freqq68, I'm getting these errors in my Vercel logs:

firebase-error [FirebaseError: Missing or insufficient permissions.] {
code: 'permission-denied',
customData: undefined,
toString: [Function (anonymous)]
}
getDocFromFirestore-error [FirebaseError: Missing or insufficient permissions.] {
code: 'permission-denied',
customData: undefined,
toString: [Function (anonymous)]
}

In all likelihood, you're seeing the same problem. It appears that the contemporary default Firebase permissions do not allow access. Not being overly familiar with Firebase these days, I'm currently digging into what the correct Rules for Firebase would look like versus the default:

rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  }
}

Whilst people on the web and various LLMs will tell you to allow read, write or similar, this allows anybody to read and write the database, which is obviously bad from a security perspective, but also one of potentially getting an astronomically high bill for someone's abuse of your database.

HammyHavoc commented 5 months ago

@freqq68, looking at your screenshot, I can see the problem you're facing:

freqq68 commented 4 months ago

I'm out of the project now :/ Maybe I retry later. Thank's 🥇