LoginSignup
1

More than 5 years have passed since last update.

Firebase(Web)のセキュリティを10秒でさらっと確認する

Posted at

①Google Web Developer Toolsでコンソールを開きます。(WindowsではF12キー、MacではCommand + Option + I)

②Firebaseを読み込みます。

const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://www.gstatic.com/firebasejs/5.8.4/firebase.js';
document.head.appendChild(script);

③Firebaseの初期設定をします。

const config ={apiKey:"hogehoge",authDomain:"hoge.firebaseapp.com",databaseURL:"https://hoge.com",projectId:"hoge",storageBucket:"hoge.hoge.com",messagingSenderId:"000000000"}; 

firebase.initializeApp(config);

④データベースにアクセスします。

firebase.database().ref().once('value', function(snapshot) {
  console.log(snapshot.val());
});

コンソール上で何も出力されなければOKです。

(上記の例はあくまでもさらっと確認しているだけなので、不安な人は公式ドキュメントを読んでください。)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1