{"id":300,"date":"2018-05-11T20:20:23","date_gmt":"2018-05-11T20:20:23","guid":{"rendered":"https:\/\/ucsbwebdev.fzilla.com\/?p=300"},"modified":"2018-05-18T01:43:06","modified_gmt":"2018-05-18T01:43:06","slug":"setting-up-firebase","status":"publish","type":"post","link":"https:\/\/ucsbwebdev.fzilla.com\/?p=300","title":{"rendered":"Setting up Firebase"},"content":{"rendered":"<p>Go to\u00a0<a href=\"https:\/\/firebase.google.com\/\">https:\/\/firebase.google.com\/<\/a>\u00a0and click SIGN IN<\/p>\n<p>Then go to <a href=\"https:\/\/console.firebase.google.com\/u\/0\/\">https:\/\/console.firebase.google.com\/u\/0\/<\/a>\u00a0and click <strong>Add Project<\/strong><\/p>\n<p id=\"UckMhZF\"><img loading=\"lazy\" decoding=\"async\" width=\"1494\" height=\"1284\" class=\"alignnone size-full wp-image-303 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1b49676a.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1b49676a.png 1494w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1b49676a-300x258.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1b49676a-768x660.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1b49676a-1024x880.png 1024w\" sizes=\"auto, (max-width: 1494px) 100vw, 1494px\" \/><\/p>\n<p>Enter a name and Create Project<\/p>\n<p id=\"nbGDApQ\"><img loading=\"lazy\" decoding=\"async\" width=\"1054\" height=\"1094\" class=\"alignnone size-full wp-image-304 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1c6ab654.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1c6ab654.png 1054w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1c6ab654-289x300.png 289w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1c6ab654-768x797.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5d1c6ab654-987x1024.png 987w\" sizes=\"auto, (max-width: 1054px) 100vw, 1054px\" \/><\/p>\n<p>Navigate to DEVELOP -&gt; Authentication then click Set Up Sign In Method<\/p>\n<p>Enable the ones you want to use<\/p>\n<p id=\"DuLUgoL\"><img loading=\"lazy\" decoding=\"async\" width=\"1658\" height=\"820\" class=\"alignnone size-full wp-image-308 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4492acf9.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4492acf9.png 1658w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4492acf9-300x148.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4492acf9-768x380.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4492acf9-1024x506.png 1024w\" sizes=\"auto, (max-width: 1658px) 100vw, 1658px\" \/><\/p>\n<p>Remember that later you will need to add the domain of your website so it works!<\/p>\n<p id=\"wQmGoKN\"><img loading=\"lazy\" decoding=\"async\" width=\"1606\" height=\"522\" class=\"alignnone size-full wp-image-309 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e47d0a00f.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e47d0a00f.png 1606w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e47d0a00f-300x98.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e47d0a00f-768x250.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e47d0a00f-1024x333.png 1024w\" sizes=\"auto, (max-width: 1606px) 100vw, 1606px\" \/><\/p>\n<p>Now select DEVELOP-&gt;Database<\/p>\n<p id=\"KWWdKCv\"><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"402\" class=\"alignnone size-full wp-image-310 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4a28f8cd.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4a28f8cd.png 514w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4a28f8cd-300x235.png 300w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/p>\n<p>Then Firestore Get Started<\/p>\n<p id=\"DQvmQvd\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"602\" class=\"alignnone size-full wp-image-311 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4b6e0f04.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4b6e0f04.png 966w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4b6e0f04-300x187.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4b6e0f04-768x479.png 768w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/p>\n<p>Set it in Test Mode and Enable<\/p>\n<p id=\"mltDBls\"><img loading=\"lazy\" decoding=\"async\" width=\"1320\" height=\"836\" class=\"alignnone size-full wp-image-312 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4cb112ee.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4cb112ee.png 1320w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4cb112ee-300x190.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4cb112ee-768x486.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4cb112ee-1024x649.png 1024w\" sizes=\"auto, (max-width: 1320px) 100vw, 1320px\" \/><\/p>\n<p>Finally, let&#8217;s enable storage<\/p>\n<p id=\"iEzLeGo\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"454\" class=\"alignnone size-full wp-image-313 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4fb6d277.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4fb6d277.png 512w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e4fb6d277-300x266.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<p id=\"kBRBIhp\"><img loading=\"lazy\" decoding=\"async\" width=\"1204\" height=\"496\" class=\"alignnone size-full wp-image-314 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e53d8365a.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e53d8365a.png 1204w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e53d8365a-300x124.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e53d8365a-768x316.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e53d8365a-1024x422.png 1024w\" sizes=\"auto, (max-width: 1204px) 100vw, 1204px\" \/><\/p>\n<p id=\"hYHzahB\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"718\" class=\"alignnone size-full wp-image-315 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5584e14e.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5584e14e.png 1190w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5584e14e-300x181.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5584e14e-768x463.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5584e14e-1024x618.png 1024w\" sizes=\"auto, (max-width: 1190px) 100vw, 1190px\" \/><\/p>\n<p>Now go to rules tab<\/p>\n<p id=\"hzkPTtG\"><img loading=\"lazy\" decoding=\"async\" width=\"1640\" height=\"738\" class=\"alignnone size-full wp-image-316 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5684d801.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5684d801.png 1640w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5684d801-300x135.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5684d801-768x346.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5684d801-1024x461.png 1024w\" sizes=\"auto, (max-width: 1640px) 100vw, 1640px\" \/><\/p>\n<p>Change to<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">service firebase.storage {\r\n  match \/b\/{bucket}\/o {\r\n    match \/{allPaths=**} {\r\n      allow read, write\r\n    }\r\n  }\r\n}<\/pre>\n<p>Then publish.<\/p>\n<p>&nbsp;<\/p>\n<h2>Get authnetication information<\/h2>\n<p>Click the COG on top right and select project settings<\/p>\n<p id=\"oUrlCcG\"><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"202\" class=\"alignnone size-full wp-image-317 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5c5a7b81.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5c5a7b81.png 860w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5c5a7b81-300x70.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5c5a7b81-768x180.png 768w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/p>\n<p>Now select<\/p>\n<p id=\"imywtNo\"><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"336\" class=\"alignnone size-full wp-image-318 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5e14c482.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5e14c482.png 350w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e5e14c482-300x288.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>This will give you the code you need to add inside your project!<\/p>\n<p id=\"hLWwnur\"><img loading=\"lazy\" decoding=\"async\" width=\"1536\" height=\"878\" class=\"alignnone size-full wp-image-319 \" src=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e7b0cea8b.png\" alt=\"\" srcset=\"https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e7b0cea8b.png 1536w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e7b0cea8b-300x171.png 300w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e7b0cea8b-768x439.png 768w, https:\/\/ucsbwebdev.fzilla.com\/wp-content\/uploads\/2018\/05\/img_5af5e7b0cea8b-1024x585.png 1024w\" sizes=\"auto, (max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Download the <a href=\"https:\/\/angelprivate.s3.amazonaws.com\/teaching\/firebaseFullExample.zip\">example zip<\/a>\u00a0and then follow these steps:<\/p>\n<ol>\n<li>Extract zip<\/li>\n<li>Open the file\u00a0<strong>js\/initializeFirebase.js<\/strong><\/li>\n<li>Replace its contents with the settings from above<\/li>\n<li>Open terminal and type\u00a0<strong>&#8220;npm install&#8221;<\/strong><\/li>\n<li>Every time you want to run the system type\u00a0<strong>&#8220;gulp&#8221;<\/strong><\/li>\n<li>Here are the links you can go to for the different examples\n<ol>\n<li><strong>\/\u00a0<\/strong>will have a full login\/signup and list items example<\/li>\n<li><strong>\/items.html\u00a0<\/strong>will have a full example for working with items (add\/edit\/delete)<\/li>\n<li><strong>\/upload.html\u00a0<\/strong>has an example of uploading files<\/li>\n<li><strong>\/auth.html\u00a0<\/strong>has an example for sign up and login<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"color: white;\">https:\/\/angelprivate.s3.amazonaws.com\/teaching\/additionalFun.zip<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go to\u00a0https:\/\/firebase.google.com\/\u00a0and click SIGN IN Then go to https:\/\/console.firebase.google.com\/u\/0\/\u00a0and click Add Project Enter a name and Create Project Navigate to DEVELOP -&gt; Authentication then click Set Up Sign In Method Enable the ones you want to use Remember that later you will need to add the domain of your website so it works! Now select [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-js","category-tutorial"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300"}],"version-history":[{"count":8,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":389,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions\/389"}],"wp:attachment":[{"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ucsbwebdev.fzilla.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}