My app is three screen student project. But it shows like this Firebase error , permission denied . can you help me

1 Like

Because you are not logged in to Firebase with an authenticated user. Use the error block to capture this. (assuming you are using the firebase components)

firebaseURL ์ด 'DEFAULT'๋กœ ์ฑ„์›Œ์ ธ ์žˆ๋‹ค๋ฉด ์ €์žฅ์†Œ์˜ ์—ญํ• ์„ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์•„๋ž˜์˜ ์‚ฌ์ดํŠธ์— ๋“ค์–ด๊ฐ€ firebase๋ฅผ ํ™œ์„ฑํ™” ํ•˜์‹ญ์‡ผ. FireBase site

FireBase์˜ ํ™ˆ ์ด๋ฏธ์ง€:

๊ทธ๋ฆฌ๊ณ  ์‹œ์ž‘ํ•˜๊ธฐ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  'ํ”„๋กœ์ ํŠธ ์ถ”๊ฐ€' ๋ฅผ ์„ ํƒ๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์„ ์ •ํ•ฉ๋‹ˆ๋‹ค. ํšŒ์ƒ‰๋™๊ทธ๋ผ๋ฏธ ์† ํ…์ŠคํŠธ๋Š” FirebaseURL์˜ ์ค‘๊ฐ„์— ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. (์ˆ˜์ • ๊ฐ€๋Šฅ)

๊ทธ๋ฆฌ๊ณ  ์ ˆ์ฐจ๋ฅผ ๋”ฐ๋ผ ๊ณ„์† ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋นจ๊ฐ„ ๋™๊ทธ๋ผ๋ฏธ(Database) ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  '๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค ๋งŒ๋“ค๊ธฐ' ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์—์„  ์„ ํƒํ•˜์‹ญ์‡ผ. 'ํ…Œ์ŠคํŠธ ๋ชจ๋“œ' ๋Š” ๋ณด์•ˆ๊ทœ์น™์ด ์—…๋ฐ์ดํŠธ ๋˜์ง€ ์•Š์œผ๋ฉด 30์ผ ํ›„ ์—‘์„ธ์Šค๊ฐ€ ๊ฑฐ๋ถ€๋ฉ๋‹ˆ๋‹ค. ์›์น˜ ์•Š๋Š”๋‹ค๋ฉด 'ํฌ๋กœ๋•์…˜ ๋ชจ๋“œ' ๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”.

(์ €๋Š” 'ํฌ๋กœ๋•์…˜ ๋ชจ๋“œ' ๋ฅผ ์„ ํƒํ–ˆ์Šต๋‹ˆ๋‹ค.)

๊ทธ ๋‹ค์Œ ์„œ๋ฒ„์˜ ์œ„์น˜๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”. ์œ„์น˜๋Š” ๋‚˜์ค‘์— ๋ณ€๊ฒฝํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋นจ๊ฐ„ ๋™๊ทธ๋ผ๋ฏธ(Realtime Database) ๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”.

๋‹ค์Œ ๊ฒŒ์‹œ๋ฌผ๋กœ ์ด์–ด์ง‘๋‹ˆ๋‹ค.

์ด์–ด์ ธ์„œ..

๋…ธ๋ž€ ๋™๊ทธ๋ผ๋ฏธ ๋ถ€๋ถ„์˜ ๋งํฌ๋ฅผ ๋ณต์‚ฌํ•ด ์•ฑ ์ธ๋ฒคํ„ฐ์˜ FierbaseURL ์— ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.


URL_

'ํ”„๋กœ์ ํŠธ ์„ค์ •' ๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”.


api key๋ฅผ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค. (๋…ธ๋ž€์ƒ‰ ๋ฐ‘์ค„)

'firebaseToken' ์— api key ๋ฅผ ๋„ฃ์–ด์ฃผ์„ธ์š”.
URL_

๋งˆ์ง€๋ง‰์œผ๋กœ firebaseURL ์ด 'DEFAULT'๋กœ ์ฑ„์›Œ์ ธ ์žˆ๋‹ค๋ฉด ์ €์žฅ์†Œ์˜ ์—ญํ• ์„ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์•„๋ž˜์˜ ์‚ฌ์ดํŠธ์— ๋“ค์–ด๊ฐ€ firebase๋ฅผ ํ™œ์„ฑํ™” ํ•˜์‹ญ์‡ผ. FireBase site

FireBase์˜ ํ™ˆ ์ด๋ฏธ์ง€:

๊ทธ๋ฆฌ๊ณ  ์‹œ์ž‘ํ•˜๊ธฐ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ๊ฒŒ์‹œ๋ฌผ์— ์ด์–ด์ง‘๋‹ˆ๋‹ค..

๋‹ค์Œ ๊ฒŒ์‹œ๋ฌผ..

URL_

'ํ”„๋กœ์ ํŠธ ์„ค์ •' ๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”.


api key๋ฅผ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค. (๋…ธ๋ž€์ƒ‰ ๋ฐ‘์ค„)

'firebaseToken' ์— api key ๋ฅผ ๋„ฃ์–ด์ฃผ์„ธ์š”.
URL_

[๊ทœ์น™] ์œผ๋กœ ๊ฐ€๊ณ  'false' ๋ฅผ 'true' ๋กœ ๋ฐ”๊พผ๋‹ค.
๋ฐ”๊พธ๊ณ  ๋‚˜์„œ ๊ทธ ์œ„์— '๊ฐœ์‹œ' ๋ฅผ ์„ ํƒํ•œ๋‹ค.

์ด์ œ ์„ฑ๊ณต์ ์œผ๋กœ ์•ฑ ์ธ๋ฒคํ„ฐ์—์„œ Firenbase๋ฅผ ์‚ฌ์šฉํ•  ์ค€๋น„๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!
๋„์›€์ด ๋˜๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค..