{"id":2793,"date":"2020-05-05T12:00:45","date_gmt":"2020-05-05T03:00:45","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2793"},"modified":"2020-05-05T13:16:28","modified_gmt":"2020-05-05T04:16:28","slug":"flutter-firebase%e3%81%ae%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2793","title":{"rendered":"Flutter Firebase Authentication\u306e\u64cd\u4f5c"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Firebase Authentication\u3078\u306e\u767b\u9332<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>  FirebaseAuth firebaseAuth = FirebaseAuth.instance;\n  DatabaseReference dbRef = FirebaseDatabase.instance.reference().child('Users');\n\n    firebaseAuth\n        .createUserWithEmailAndPassword(\n          email: emailController.text,\n          password: passwordController.text).then((result){\n          dbRef.child(result.user.uid).set({\n            'email': emailController.text,\n          })<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Firebase Authentication\u3078\u306e\u30ed\u30b0\u30a4\u30f3<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>  FirebaseAuth firebaseAuth = FirebaseAuth.instance;\n    firebaseAuth.signInWithEmailAndPassword(\n        email: emailController.text,\n        password: passwordController.text)\n        .then((result){\n          Navigator.pushReplacement(\n              context,\n              MaterialPageRoute(builder: (context) => HomePage(uid: result.user.uid)),\n          );\n    })<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Firebase Authentication\u5b58\u5728\u78ba\u8a8d<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>    FirebaseAuth.instance.currentUser().then((response) { }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Firebase Authentication\u30ed\u30b0\u30a2\u30a6\u30c8<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>              FirebaseAuth auth = FirebaseAuth.instance;\n              auth.signOut().then((response){}\n               <\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firebase Authentication\u3078\u306e\u767b\u9332 Firebase Authentication\u3078\u306e\u30ed\u30b0\u30a4\u30f3 Firebase Authentication\u5b58\u5728\u78ba\u8a8d Firebase Authentication\u30ed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[68,67,4],"tags":[],"class_list":["post-2793","post","type-post","status-publish","format-standard","hentry","category-firebase","category-flutter","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2793"}],"version-history":[{"count":8,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2793\/revisions"}],"predecessor-version":[{"id":2807,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2793\/revisions\/2807"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}