<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kriss on Medium]]></title>
        <description><![CDATA[Stories by Kriss on Medium]]></description>
        <link>https://medium.com/@laraveltut?source=rss-a1ce475689cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fo976hJGHb_4vRk-</url>
            <title>Stories by Kriss on Medium</title>
            <link>https://medium.com/@laraveltut?source=rss-a1ce475689cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:26:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@laraveltut/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Build React Native Fitness App #7 : Firebase Email and Password Authentication]]></title>
            <link>https://medium.com/react-native-mastery/build-react-native-fitness-app-7-firebase-email-and-password-authentication-79c14c06d01e?source=rss-a1ce475689cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/79c14c06d01e</guid>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Kriss]]></dc:creator>
            <pubDate>Sun, 02 Feb 2020 12:40:07 GMT</pubDate>
            <atom:updated>2020-02-25T11:45:37.640Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build React Native Fitness App #7 : Firebase Email and Password Authentication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lOQI1BSNl5wDSHdi.png" /></figure><p>This tutorial is seventh chapter of series build fitness tracker this app use for track workouts, diets, or health activities and analyze data and display suggestion the ultimate goal is to create food and health recommendation using Machine learning we start with creating app that user wants to use and connect to google health and apple heath for gathering everything to create dataset that uses for train model later I start with ultimate goal. Still, we will start to create react native app and set up screen navigation with React navigation. inspired by <a href="http://instamobile.io/">React native template</a></p><p>this chapter we are going to implement email and password login after we success on registration part in the <a href="https://kriss.io/build-react-native-fitness-app-6-firebase-email-authentication-integrate-formik-and-yup/">previous section</a> we start by import react-native Firebase, Formik, Yup then add validation message lasting send an authentication request to Firebase if success we immediately redirect to next screen</p><h4>Get started</h4><p>import to three packages that we want to use to LoginScreen.js</p><pre>import firebase from &#39;react-native-firebase&#39;<br>import {Formik} from &#39;formik&#39;;<br>import * as yup from &#39;yup&#39;;</pre><p>next start define validation schema</p><pre>const LoginSchema = Yup.object().shape({<br>  email: Yup.string()<br>    .email(&#39;Invalid email&#39;)<br>    .required(&#39;Email is Required&#39;),<br>  password: Yup.string()<br>    .required(&#39;Password is required&#39;)<br>    .min(6, &#39;Password must be at least 6 characters&#39;),<br>});</pre><p>next, integrate Formik to Form following code below</p><pre>&lt;Formik<br>         initialValues={{email: &#39;&#39;, password: &#39;&#39;}}<br>         onSubmit={(values, {setSubmitting}) =&gt; {<br>           this.Login(values, this.props.navigation);<br>           setSubmitting(false);<br>         }}<br>         validationSchema={LoginSchema}&gt;<br>         {formikProps =&gt; (<br>           &lt;React.Fragment&gt;<br>             &lt;View style={styles.wrapper}&gt;<br>               &lt;Input<br>                 leftIcon={<br>                   &lt;Icon<br>                     name=&quot;md-mail&quot;<br>                     type=&quot;ionicon&quot;<br>                     color=&quot;rgba(110, 120, 170, 1)&quot;<br>                     size={25}<br>                   /&gt;<br>                 }<br>                 onChangeText={formikProps.handleChange(&#39;email&#39;)}<br>                 placeholder=&quot;Email&quot;<br>                 inputContainerStyle={styles.input}<br>                 placeholderTextColor=&quot;grey&quot;<br>                 autoCapitalize=&quot;none&quot;<br>                 autoCorrect={false}<br>                 keyboardType=&quot;email-address&quot;<br>                 returnKeyType=&quot;next&quot;<br>               /&gt;<br>               {formikProps.errors.email ? (<br>                 &lt;Text style={{color: &#39;red&#39;}}&gt;<br>                   {formikProps.errors.email}<br>                 &lt;/Text&gt;<br>               ) : null}<br>               &lt;Input<br>                 leftIcon={<br>                   &lt;Icon<br>                     name=&quot;lock&quot;<br>                     color=&quot;rgba(110, 120, 170, 1)&quot;<br>                     size={25}<br>                   /&gt;<br>                 }<br>                 onChangeText={formikProps.handleChange(&#39;password&#39;)}<br>                 inputContainerStyle={styles.input}<br>                 placeholderTextColor=&quot;grey&quot;<br>                 placeholder=&quot;Password&quot;<br>                 autoCapitalize=&quot;none&quot;<br>                 secureTextEntry={true}<br>                 autoCorrect={false}<br>                 keyboardType=&quot;default&quot;<br>                 returnKeyType=&quot;next&quot;<br>               /&gt;<br>               {formikProps.errors.password ? (<br>                 &lt;Text style={{color: &#39;red&#39;}}&gt;<br>                   {formikProps.errors.password}<br>                 &lt;/Text&gt;<br>               ) : null}<br>             &lt;/View&gt;<br>             &lt;View style={styles.socialWrapper}&gt;<br>               &lt;Text style={styles.signinwith}&gt;Sign in with&lt;/Text&gt;<br>               &lt;View style={styles.socialLogin}&gt;<br>                 &lt;SocialIcon type=&quot;facebook&quot; light /&gt;<br>                 &lt;SocialIcon type=&quot;google&quot; light /&gt;<br>                 &lt;SocialIcon type=&quot;twitter&quot; light /&gt;<br>               &lt;/View&gt;<br>               &lt;Button<br>                 title=&quot;Login&quot;<br>                 loading={false}<br>                 loadingProps={{size: &#39;small&#39;, color: &#39;white&#39;}}<br>                 buttonStyle={{<br>                   backgroundColor: &#39;#7265E3&#39;,<br>                   borderRadius: 15,<br>                 }}<br>                 titleStyle={{fontWeight: &#39;bold&#39;, fontSize: 23}}<br>                 containerStyle={{<br>                   marginVertical: 10,<br>                   height: 50,<br>                   width: 300,<br>                 }}<br>                 onPress={formikProps.handleSubmit}<br>                 disabled={!(formikProps.isValid &amp;&amp; formikProps.dirty)}<br>                 underlayColor=&quot;transparent&quot;<br>               /&gt;<br>               &lt;TouchableOpacity<br>                 onPress={() =&gt;<br>                   this.props.navigation.navigate(&#39;ForgotPasswordScreen&#39;)<br>                 }&gt;<br>                 &lt;Text h5 style={{textAlign: &#39;center&#39;, color: &#39;blue&#39;}}&gt;<br>                   Forgot Password?<br>                 &lt;/Text&gt;<br>               &lt;/TouchableOpacity&gt;<br>             &lt;/View&gt;<br>           &lt;/React.Fragment&gt;<br>         )}<br>       &lt;/Formik&gt;</pre><p>see the same result because we did not touch anything on the layout</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/0*T-eFcCWqTOtol5Xb.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*nPjXIo4wgmFkIlnX.png" /></figure><p>next, we create a function for the handle Authentication function</p><pre>Login = (values, navigation) =&gt; {<br>  firebase<br>    .auth()<br>    .signInWithEmailAndPassword(values.email, values.password)<br>    .then(response =&gt; {<br>      let {user} = response;<br>      this.setState({user});</pre><pre>      alert(&#39;Registration success&#39;);<br>      setTimeout(() =&gt; {<br>        navigation.navigate(&#39;HomeScreen&#39;);<br>      }, 2000);<br>    })<br>    .catch(err =&gt; {<br>      alert(err);<br>    });<br>};</pre><p>next, we create HomeScreen for handle redirect after login success</p><p>create HomeScreen.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/0*xR3BfzeOI7I51MxK.png" /></figure><p>then add blank class</p><pre>import React, {Component} from &#39;react&#39;;<br>import {Text, View} from &#39;react-native&#39;;</pre><pre>export class HomeScreen extends Component {<br>  render() {<br>    return (<br>      &lt;View&gt;<br>        &lt;Text&gt; HomeScreen &lt;/Text&gt;<br>      &lt;/View&gt;<br>    );<br>  }<br>}</pre><pre>export default HomeScreen;</pre><p>then add to Navigator</p><pre>const StackNavigator = createStackNavigator(<br>  {<br>    IntroScreen: IntroScreen,<br>    LoginScreen: LoginScreen,<br>    EmailInputscreen: EmailInputscreen,<br>    PasswordInputScreen: PasswordInputScreen,<br>    HomeScreen: HomeScreen,<br>  },<br>  {<br>    initialRouteName: &#39;LoginScreen&#39;,<br>  },<br>);</pre><p>now we can try to do fail case first</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/0*ipqcXaR_BwM0934b.gif" /></figure><p>then we can try the success case later</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/0*mlSXRStMNb0XOqTY.gif" /></figure><h4>Conclusion</h4><p>this short chapter shows how to create a simple login form with Formik. And handle validation with Yup .Then we submit the form to Firebase authentication service and store user data to state then redirect to Home Screen. For the next chapter, we implement the forgot password with Firebase again.</p><p><em>Originally published at </em><a href="https://kriss.io/build-react-native-fitness-app-7-firebase-email-and-password-authentication/"><em>Kriss</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79c14c06d01e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/react-native-mastery/build-react-native-fitness-app-7-firebase-email-and-password-authentication-79c14c06d01e">Build React Native Fitness App #7 : Firebase Email and Password Authentication</a> was originally published in <a href="https://medium.com/react-native-mastery">React Native Mastery</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Github Authentication with Firebase | React | Bit]]></title>
            <link>https://medium.com/@laraveltut/github-authentication-with-firebase-react-bit-c478e761d5e2?source=rss-a1ce475689cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c478e761d5e2</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript-development]]></category>
            <dc:creator><![CDATA[Kriss]]></dc:creator>
            <pubDate>Sun, 15 Sep 2019 04:12:00 GMT</pubDate>
            <atom:updated>2020-01-22T08:54:00.584Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AJ-IfmxtP3YysTv6eNwUVA.png" /></figure><h4>Make a fully functional real estate app in minutes</h4><p>Become the next Trulia, Zillow or Airbnb by releasing a real estate app for both iOS and Android in minutes. <a href="https://www.instamobile.io/app-templates/real-estate-app-template-react-native/">Download our functional React Native Real Estate app template</a>, integrated with Firebase Backend, to literally launch your own app today. Crafted with extreme attention to details, this beautiful app template written in React Native represents the best way to jumpstart the development of your new mobile app.</p><p>Now, let’s get on with implementing the Github login with Firebase and React then make shareable with Bit</p><h3>What you’ll learn …?</h3><ul><li>How to pass props in React.</li><li>How to use Firebase Authentication.</li><li>How to create and set up a Github app.</li><li>How to use Bit.</li></ul><p>Most of the points have already been covered in the first chapter, so this chapter makes the concepts even clearer as we move along.</p><h3>Requirements</h3><p>Here’s a complete list of plugins, packages, and services we’re going to need to gain something from this tutorial:</p><ul><li>Nodejs v8.x.x or higher installed along with NPM/yarn.</li><li>Firebase, Github and Bit account.</li><li>Already completed project from the previous chapter.</li><li>Firebase and Bit package.</li></ul><h3>Create a Github App</h3><p>first create new <a href="https://github.com/settings/apps/new">GitHub app</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f4EkpYyMjXOBDfYDG8oRgQ.png" /></figure><p>and filling all necessary data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*pNEdp-tYi4AP2EFnqjhRqg.png" /></figure><p>GitHub app is easy to create now we have new app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*CXzYIkuPltwcrM2jVwfxvA.png" /></figure><p>grab Client ID and Client secret</p><h3>Config FireBase App</h3><p>goto our app and open Authentication &gt; Sign In Method &gt; pasting Client ID and Client Secret on Github tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*cSCBx7W6xACiC_7AiplgpQ.png" /></figure><p>and save now we can use Github Login on Our app</p><h3>Create a Github Login Component</h3><p>now we replicate other component that we build from previous part and chage all function ,class ,file name to Github</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*PRwGoCEqT909WQdn8Dsp0A.png" /></figure><p>in GitHubAuth.jsx change all everything to Gihutb</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26c363b3e00e0da8da1ce2823b83f698/href">https://medium.com/media/26c363b3e00e0da8da1ce2823b83f698/href</a></iframe><p>and at index.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b65710111d2d88eb1bab14e4bb04e89/href">https://medium.com/media/0b65710111d2d88eb1bab14e4bb04e89/href</a></iframe><p>now we can use component in main App.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f200ffa2565f1bc23b7d26c8bc9d9c18/href">https://medium.com/media/f200ffa2565f1bc23b7d26c8bc9d9c18/href</a></iframe><p>let testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GFarP1Idsw72W1NSLd76iA.gif" /></figure><p>it’s work let share again on Bit</p><h3>Make it Reusable and Sharable with Bit</h3><p><a href="https://bit.dev/">Bit. Composable software.</a></p><p>To make our code reusable and shareable, we’ll do some restructuring and move all our code to ‘components’ (this is not mandatory but a better practice, when using <a href="https://bit.dev/">Bit</a>). Then, we’ll export it (with all its dependencies), to a component collection on <a href="https://bit.dev/components">Bit’s cloud</a>, to be shared with others and easily reused.</p><p>In this step, we are going to push the new component i.e. Google login component to Bit again. We already have our Bit package installed and connected to our Bit account. So, we need to create a collection and start by tracking the component.</p><p>Note:: The first and second step features an installation of Bit account. These steps can be skipped if you already have a Bit account.</p><h4>1. Initialize Bit on a project</h4><p>Here, we create a new collection on Bit to which we are going to push all our component code. We use the Bit “create collection” configuration page to create a new collection named “firebase-auth-collection” as shown in the screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*FF1zzr2tVDlxytpkbV7Cbw.png" /></figure><p>To successfully push the whole project to Bit, you need to follow the instructions given on the page shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ccQIEhgssTq-cQdb4stu7w.png" /></figure><p>First, we need to install Bit CLI</p><blockquote>Using NPM,</blockquote><blockquote><em>npm install bit-bin --global</em></blockquote><p>Then, we need to go to the project directory in our Bit CLI and perform the commands bit init and run bit login on Bit CLI as shown in the screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*y2bXTuO2sAPDSDdwiJuegw.png" /></figure><h4>2. Configure a React compiler for our component</h4><p>When we configure a compiler we tell Bit to capsule the component with it. Capsuling components together with their compilers gives us the freedom to use, build and test them anywhere. This includes being able to run the code in any of the applications we’d like to use the component in, as well as running it in the cloud to enable features such as the <a href="https://bit.dev/davidhu2000/react-spinners/pacman-loader">live component playground</a>.</p><pre>bit import bit.envs/compilers/react --compiler</pre><h4>3. Track components</h4><p>We need to track our component by using the following command in your command prompt or Bit console:</p><p>bit add src/components/GithubAuth</p><p>The result after the command is performed is shown below in the screenshot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*zAg2dB5lw3f7Z4uBzp2IPA.png" /></figure><h4>4. Tag and export</h4><p>Here, we are going to s<a href="https://docs.bit.dev/docs/versioning-tracked-components.html">et a version</a> to all tracked components, and export to this collection using following bit command:</p><p>bit tag --all 1.0.0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*1pjbIqWVj3xBGCEVNIE9Sw.png" /></figure><p>Finally, we need to perform following bit command to push our component code to bit collection that we created before:</p><pre>bit export krissnawat.firebase-auth-collection</pre><p>Now, our package is live on <a href="https://bit.dev/krissnawat/firebase-auth-collection/google-auth">Bit</a>. It is our second component in our firebase auth collection as shown in the screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6m6kNj-xrIgc89d9XEfIAA.png" /></figure><p>Lastly, we need to replace the component in our <em>App.js </em>file as shown in the code snippet below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d28105f3c6121d41e07671dc0d48da4e/href">https://medium.com/media/d28105f3c6121d41e07671dc0d48da4e/href</a></iframe><p>Finally, the implementation of Github login with firebase auth and uploading the component to Bit is complete. Now, we can run the project locally to test everything.</p><h4>Conclusion</h4><p>In this tutorial, we learned how to implement Github login with firebase. We also learned about implementing the reusable code in the form of components as in the previous chapter. Finally, we were successful in pushing our second component in our Firebase Auth collection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c478e761d5e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>