<?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 Artur Klajnerok on Medium]]></title>
        <description><![CDATA[Stories by Artur Klajnerok on Medium]]></description>
        <link>https://medium.com/@aklajnerok?source=rss-547c8ed7f21a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KGr0P18ohck3YBIE8slACA.png</url>
            <title>Stories by Artur Klajnerok on Medium</title>
            <link>https://medium.com/@aklajnerok?source=rss-547c8ed7f21a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:58:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aklajnerok/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[Hiking Fanellhorn 3123m in the Lepontine Alps, Switzerland]]></title>
            <link>https://medium.com/@aklajnerok/hiking-fanellhorn-3123m-in-the-lepontine-alps-switzerland-c9185c828c23?source=rss-547c8ed7f21a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9185c828c23</guid>
            <category><![CDATA[hiking]]></category>
            <category><![CDATA[mountains]]></category>
            <category><![CDATA[switzerland]]></category>
            <category><![CDATA[summit]]></category>
            <category><![CDATA[alps]]></category>
            <dc:creator><![CDATA[Artur Klajnerok]]></dc:creator>
            <pubDate>Sun, 30 Jul 2023 09:45:50 GMT</pubDate>
            <atom:updated>2023-07-30T09:45:50.713Z</atom:updated>
            <content:encoded><![CDATA[<p>Hiking starts …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPqFa2t5DUxTPOtgJKOSNw.jpeg" /><figcaption>Fenellhron 3123 summit plate</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsqsnqOSfiRqwTfIJvvs3Q.jpeg" /><figcaption>Fanellhorn view towards …</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2DmaTR8KiGffNpYIyVb6OA.jpeg" /><figcaption>Fanellhorn Summit - Artur Klajnerok</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1QOO0Z0JenvBpUKVtUAZ7g.jpeg" /><figcaption>Fanellhorn Summit — Artur Klajnerok</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9185c828c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create React App With Auth0?]]></title>
            <link>https://medium.com/@aklajnerok/how-to-create-react-app-with-auth0-74d7a55ed0a7?source=rss-547c8ed7f21a------2</link>
            <guid isPermaLink="false">https://medium.com/p/74d7a55ed0a7</guid>
            <category><![CDATA[auth0]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[identity]]></category>
            <category><![CDATA[login]]></category>
            <dc:creator><![CDATA[Artur Klajnerok]]></dc:creator>
            <pubDate>Fri, 30 Dec 2022 15:38:17 GMT</pubDate>
            <atom:updated>2022-12-30T15:38:17.174Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create React App</h3><p>Install the create-react-app command-line tool and use it to create a new React app :</p><pre>npm install -g create-react-app<br>create-react-app my-app</pre><p>Considering that your react application was created in my-app directory, get into that directory :</p><pre>cd my-app</pre><p>To start the new application, run :</p><pre>npm start</pre><p>By default you should be able to access a brand new react app at http://localhost:3000 and see the app initial page :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bjEgdceUL3pDOC1v.png" /></figure><h3>Create Auth0 account</h3><p>Sign up for an Auth0 account and create a new application: <a href="https://auth0.com/signup">https://auth0.com/signup</a></p><p>This will give you a domain, client ID, and client secret that you can use to authenticate your users.</p><h3>Add Auth0 Rect SDK</h3><p>Install the Auth0 Rect SDK with npm:</p><pre>npm install @auth0/auth0-react</pre><h3>Add Auth0Provider</h3><p>Add Auth0Provider component in your src/index.js, wrapping the App component and configure it with your Auth0 application domain and clientId, set redirectUri to your local app url:</p><pre>import { Auth0Provider } from &#39;@auth0/auth0-react&#39;;</pre><pre>&lt;Auth0Provider<br>  domain=&quot;your-auth0-domain.com&quot;<br>  clientId=&quot;your-client-id&quot;<br>  redirectUri=&quot;http://localhost:3000&quot;<br>&gt;<br>  &lt;App /&gt;<br>&lt;/Auth0Provider&gt;</pre><h3>Create and add Login button</h3><p>Create a LoginButton.js file in src directory and add the code that uses loginWithRedirect function to handle login flow on click event.</p><pre>import { useAuth0 } from &#39;@auth0/auth0-react&#39;;</pre><pre>const LoginButton = () =&gt; {<br>  const { loginWithRedirect } = useAuth0();</pre><pre>  return (<br>    &lt;button onClick={() =&gt; loginWithRedirect()} className=&quot;App-button&quot;&gt;<br>      Log In<br>    &lt;/button&gt;<br>  );<br>};</pre><pre>export default LoginButton;</pre><p>To moke the button bit more accessible on different devices, let’s add a simple styling to make it bigger. Add this style in your App.css file :</p><pre>.App-button {<br>  font-size: 1.4rem;<br>  font-weight: bold;<br>  padding: 10px;<br>}</pre><p>This is how your React App should look like once the Login button is added :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-_H5CpE1nyO4WIi8.png" /></figure><p>Once you hit the Login button you should be redirected to your app login page :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UELG4Rc2d29xNeol.png" /></figure><h3>Display User Profile information</h3><pre>import { useAuth0 } from &#39;@auth0/auth0-react&#39;;</pre><pre>const Profile = () =&gt; {<br>  const { user, isAuthenticated, isLoading } = useAuth0();</pre><pre>  if (isLoading) {<br>    return &lt;div&gt;&lt;p&gt;Loading ...&lt;/p&gt;&lt;/div&gt;;<br>  }</pre><pre>  return (<br>    isAuthenticated &amp;&amp; (<br>      &lt;div&gt;<br>        &lt;img src={user.picture} alt={user.name} className=&quot;App-profile-picture&quot; /&gt;<br>        &lt;p&gt;{user.name}&lt;/p&gt;<br>      &lt;/div&gt;<br>    )<br>  );<br>};</pre><pre>export default Profile;</pre><pre>.App-profile-picture {<br>  height: 120px;<br>  weight: 120px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FqZv7g6NtTm0xsK9.png" /></figure><h3>Create and add Logout button</h3><p>Create a LogoutButton.js file in src directory and add the code that uses logout function to handle logout flow on click event.</p><pre>import { useAuth0 } from &#39;@auth0/auth0-react&#39;;</pre><pre>const LogoutButton = () =&gt; {<br>  const { logout } = useAuth0();</pre><pre>  return (<br>    &lt;button onClick={() =&gt; logout({ returnTo: window.location.origin })} className=&quot;App-button&quot;&gt;<br>      Log Out<br>    &lt;/button&gt;<br>  );<br>};</pre><pre>export default LogoutButton;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74d7a55ed0a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>