<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ralph Vaz</title>
    <description>The latest articles on DEV Community by Ralph Vaz (@ralphwjz).</description>
    <link>https://dev.to/ralphwjz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F405178%2F985362e8-ba41-4071-884e-084e92812dcd.jpeg</url>
      <title>DEV Community: Ralph Vaz</title>
      <link>https://dev.to/ralphwjz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ralphwjz"/>
    <language>en</language>
    <item>
      <title>We built an API Builder for our API-based automation platform</title>
      <dc:creator>Ralph Vaz</dc:creator>
      <pubDate>Thu, 03 Jun 2021 07:27:48 +0000</pubDate>
      <link>https://dev.to/ralphwjz/we-built-an-api-builder-for-our-api-based-automation-platform-1e6d</link>
      <guid>https://dev.to/ralphwjz/we-built-an-api-builder-for-our-api-based-automation-platform-1e6d</guid>
      <description>&lt;p&gt;&lt;a href="https://pathfix.com/automation" rel="noopener noreferrer"&gt;Pathfix Automation&lt;/a&gt; runs on APIs only &lt;strong&gt;(think: if Zapier and Postman had a baby)&lt;/strong&gt;, so it made sense for us to spend a lot of time to build out a slick and easy to use API builder.&lt;/p&gt;

&lt;p&gt;With Automation, we want to give our users the ability to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;build complex workflows (both internal and user-facing)&lt;/li&gt;
&lt;li&gt;call any API&lt;/li&gt;
&lt;li&gt;enrich the data&lt;/li&gt;
&lt;li&gt;transform data&lt;/li&gt;
&lt;li&gt;send to the next API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;……..and essentially, work the way they wanted – without any limitations!&lt;/p&gt;

&lt;p&gt;This made the API builder a very cruicial feature in our platform.&lt;/p&gt;

&lt;p&gt;(But first, a little introduction)&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Pathfix Automation?
&lt;/h2&gt;

&lt;p&gt;Automation is an API based automation platform that allows users to build flows using only APIs. Users can add multiple APIs and then stitch them all together to build out any automation they want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283420126%2FEzLd7oyo5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283420126%2FEzLd7oyo5.png" alt="2.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Automation platform came from the idea that existing tools are a bit too restrictive and doesn’t allow you to &lt;strong&gt;simply work with APIs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, based on many (many!) user requests, we decided to build a platform that ran purely on APIs, this meant that you can automate any process with any provider that has an API available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not just internal automation&lt;/strong&gt; – More exciting is that you would be able to add user facing automation (integration) to your platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283463282%2F5Q4E409n1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283463282%2F5Q4E409n1.jpeg" alt="Pathfix Automation.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The API Builder
&lt;/h2&gt;

&lt;p&gt;We needed to start by answering the basic questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many APIs will our users have&lt;/li&gt;
&lt;li&gt;Should we have one dedicated page for APIs built (or, have it accessible from a popup)&lt;/li&gt;
&lt;li&gt;Allow for Search by multiple methods (keywords, url etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We knew our users will have multiple APIs (I mean, ours is an API ONLY automation platform) but, we did not want them to lose context by leaving their design environment.&lt;/p&gt;

&lt;p&gt;Enter – &lt;strong&gt;Single Page App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We added Design, Connections, Constants and the most important APIs as a quick popup – all without the user ever leaving their design environment.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Et Voila!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283542614%2FxjhTv06qn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283542614%2FxjhTv06qn.png" alt="api1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design With Function&lt;/strong&gt;&lt;br&gt;
We just had one goal – &lt;strong&gt;make adding APIs effortless!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To achieve this, we started to look at other API builders and connectors. Read reviews, researched on forums to understand what users wanted and what caused them the most pain while adding APIs.&lt;/p&gt;

&lt;p&gt;Here’s where we settled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It needed to be &lt;strong&gt;nocode&lt;/strong&gt; (read: no nonsense)&lt;/li&gt;
&lt;li&gt;Postman was the standard when it came to working with APIs. It’s ease of use and general ‘known’ feel was unmatched of course&lt;/li&gt;
&lt;li&gt;Bubble.io’s API Connector was simple, to the point and had a few elements we knew we could use (yes, the API Connector is a bit complex and has wayyy too many options that complicate makers. But we’re not gonna go there 🙂 )&lt;/li&gt;
&lt;li&gt;With this in mind, we started building out the API Builder. We knew we had to have the basic functionality including calling multiple methods, endpoint, Body, Headers and Query Params&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s what the builder looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283595067%2FDDgErDgO5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283595067%2FDDgErDgO5.png" alt="api3.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apart from these, we added a few features that checked the ‘convenience factor’ box.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import configuration from library (ours and yours)&lt;/li&gt;
&lt;li&gt;Import from CURL&lt;/li&gt;
&lt;li&gt;Import from JSON&lt;/li&gt;
&lt;li&gt;Export to JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This just made it super easy to work with APIs. So if you are not familiar with working with APIs, simply import a curl and we will get you all sorted!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283669951%2FJxWpDjmFd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283669951%2FJxWpDjmFd.jpeg" alt="API5.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Values&lt;/strong&gt;&lt;br&gt;
The power of Pathfix Automation was in the fact that we allowed users to play with the data received, handle the transformation and push dynamic data to another API.&lt;/p&gt;

&lt;p&gt;Since Dynamic Values was pretty important, we added the easiest way for users to add this – add &amp;lt;&amp;gt; brackets to any dynamic field.&lt;/p&gt;

&lt;p&gt;Once added, users can simply select the dynamic values for these fields from any API calls made in the flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283728003%2FGKI1rQnnD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622283728003%2FGKI1rQnnD.png" alt="dynamic.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See what we did there? Our 4th task used data pulled from our 2nd and 3rd task. Just select the API and select the field.&lt;/p&gt;

&lt;p&gt;Automation takes care of the rest!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API Builder Video&lt;/strong&gt;&lt;br&gt;
We created a video that details how you can use the API builder and walks through how it works.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=Jl5mOPkRF1o&amp;lt;br&amp;gt;%0A" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1d0rnestrnnhclnnpu0m.png" alt="API Builder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Building the API Builder was definitely a challenge. The team at Pathfix took on the challenge head-on and fun along the way!&lt;/p&gt;

&lt;p&gt;Sign up free for our  &lt;a href="https://automation.pathfix.com/" rel="noopener noreferrer"&gt;Automation platform&lt;/a&gt;  and take the Builder for a spin.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Login Management for SPA and Everyone Else (Part II)</title>
      <dc:creator>Ralph Vaz</dc:creator>
      <pubDate>Tue, 01 Sep 2020 09:52:41 +0000</pubDate>
      <link>https://dev.to/ralphwjz/login-management-for-spa-and-everyone-else-part-ii-elc</link>
      <guid>https://dev.to/ralphwjz/login-management-for-spa-and-everyone-else-part-ii-elc</guid>
      <description>&lt;p&gt;This article picks up from my original post (if you haven't read that, you can read it here: &lt;a href="https://dev.to/ralphwjz/login-management-for-spa-and-everyone-else-12o6"&gt;Login Management for SPA and Everyone Else&lt;/a&gt; ) &lt;/p&gt;

&lt;p&gt;In this post, we will complete the implementation and add the Login with the providers we want. &lt;/p&gt;

&lt;p&gt;There are two ways to achieve it. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
The easy way&lt;/li&gt;
&lt;li&gt;The not-so-easy way&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I will go through option 1 :) &lt;/p&gt;

&lt;p&gt;&lt;b&gt;The Easy Way&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
I take the code for the login extension available in &lt;a href="https://app.pathfix.com"&gt;Pathfix App&lt;/a&gt;. 
&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;'pinc.helper'&lt;/span&gt; 
          &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;'https://labs.pathfix.com/helper.js'&lt;/span&gt; 
          &lt;span class="na"&gt;modules=&lt;/span&gt;&lt;span class="s"&gt;'pinc.auth.min,ui.auth'&lt;/span&gt; 
          &lt;span class="na"&gt;data-client-id=&lt;/span&gt;&lt;span class="s"&gt;'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'&lt;/span&gt; 
          &lt;span class="na"&gt;providers=&lt;/span&gt;&lt;span class="s"&gt;'msazuread,discord,fb,github,google,linkedin,ms'&lt;/span&gt; 
          &lt;span class="na"&gt;data-ui-button-prefix=&lt;/span&gt;&lt;span class="s"&gt;'Login with'&lt;/span&gt; 
          &lt;span class="na"&gt;data-on-logged-in=&lt;/span&gt;&lt;span class="s"&gt;'onLoggedIn()'&lt;/span&gt; 
          &lt;span class="na"&gt;data-on-logged-out=&lt;/span&gt;&lt;span class="s"&gt;'onLoggedOut()'&lt;/span&gt; 
          &lt;span class="na"&gt;data-auth-success-url=&lt;/span&gt;&lt;span class="s"&gt;''&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The code from Pathfix will handle the steps involved in N1:/N2:/N3:/N4: from the login flow chart (as below)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hL0N4lcl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598952669539/nMiKWJJCE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hL0N4lcl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598952669539/nMiKWJJCE.png" alt="Codeflow for OAuth Login (5).png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As soon as this is placed I see the login buttons like so...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RPahAnP8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598952910949/Z319hhtAR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RPahAnP8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598952910949/Z319hhtAR.png" alt="login.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To handle the post login event I add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;onLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="c1"&gt;//N5:&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$pinc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;onLoggedOut&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="c1"&gt;//Code to redirect to login page&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's it.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>oauth2</category>
      <category>webdev</category>
      <category>login</category>
    </item>
    <item>
      <title>Let's talk OAuth infrastructure for native integrations</title>
      <dc:creator>Ralph Vaz</dc:creator>
      <pubDate>Sun, 30 Aug 2020 07:09:18 +0000</pubDate>
      <link>https://dev.to/ralphwjz/let-s-talk-oauth-infrastructure-for-native-integrations-2na4</link>
      <guid>https://dev.to/ralphwjz/let-s-talk-oauth-infrastructure-for-native-integrations-2na4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Integrations&lt;/strong&gt;. According to a recent study by Gartner, &lt;em&gt;through 2020 SaaS companies will be spending 50% of development time on integrations.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Platforms all over the world are implementing integration-first strategies to grow and scale their product usage. However, before you can offer any in-app integrations to your users, there is a crucial piece of technology implementation you need to know – &lt;strong&gt;OAuth&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;While there are several solutions that offer integrations, these mostly handle internal automation and not necessarily user facing (read: native) integrations. This is where OAuth comes in. To know more about the difference between a workflow automation tool and an oauth solution, read our post on &lt;a href="https://pathfix.com/blog/is-pathfix-like-zapier/"&gt;Pathfix Vs. Zapier&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  &lt;em&gt;TL;DR&lt;/em&gt; - Building an OAuth module requires several hours of engineering time from setting up of servers, finding SDKs that work, building token management systems and setting up the right flows. &lt;a href="https://pathfix.com"&gt;Pathfix&lt;/a&gt; saves hours of OAuth engineering productivity with its middleware API for OAuth integrations.
&lt;/h4&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is OAuth?
&lt;/h2&gt;

&lt;p&gt;In simple terms – OAuth allows you to receive authorization from your users to get access to their data. This data does not only mean user identity, but access to data they have with their providers. OAuth framework is the most secure and preferred method adopted by most providers globally to allow for communication between applications. This is largely a two-way communication, pushing data to platforms and/or pulling data into your platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  OAuth Scopes
&lt;/h2&gt;

&lt;p&gt;Scopes limits the SaaS application’s access to the user’s data. During authorization, the user is presented with a consent screen that shows the scopes it wants to access. The user can then allow or deny access to the scope presented. The SaaS app can request access to one or more scopes which will show up in this consent screen. Scopes are always defined by the service provider; they define what data can be accessible by 3rd party and what cannot. While accessing, it is always a good idea to check the scopes permitted by the provider and enter that information that is requested as-is.&lt;/p&gt;

&lt;h2&gt;
  
  
  OAuth Grant Flow
&lt;/h2&gt;

&lt;p&gt;The most common grant type is the Grant Flow. This flow exchanges an authorization code for an access token. Here is how a typical Grant Flow works:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c9F49-kh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://alexbilbie.com/images/oauth-grants.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c9F49-kh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://alexbilbie.com/images/oauth-grants.svg" alt="OAuth Grant"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Token Management System
&lt;/h2&gt;

&lt;p&gt;As shown in the flow above, tokens are required during the process of receiving consent and permission from the user to access data. &lt;/p&gt;

&lt;p&gt;These are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access tokens&lt;/strong&gt; – Applications use access tokens to gain and make API requests on behalf of the user. This token grants the requesting application access to specific data granted by the user. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refresh tokens&lt;/strong&gt; – Used when an access token is expired, a refresh token is sent by the client to refresh expired access tokens. Your token management system needs to verify tokens, refresh expired access tokens, store tokens in secure and confidential data storage that is accessed by the provider only and most importantly, be secure in-transit and at-rest.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  OAuth Authorization Server
&lt;/h2&gt;

&lt;p&gt;The OAuth Authorization Server (AOS) is a gatekeeper that providers authentication and issues tokens. Also, it validates or rejects tokens before calls are redirected to the internal API server&lt;/p&gt;

&lt;h2&gt;
  
  
  The final piece, SDK’s
&lt;/h2&gt;

&lt;p&gt;SDK stands for Software Development Kit (or devkit) is essentially a collection of tools you need to build on a platform. They are designed to perform specific tasks, programming, or languages. This means if you are looking to build an integration to Google Sheets to pull all new entries into your application, you will need to look for and/or build an SDK that performs that exact task complete with the programming language, API and endpoints. Most often, during the OAuth programming stage, this step consumes the most time as this requires research and finding the right and stable devkit to complete the actions you are looking for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Or, Get Serverless OAuth Instead
&lt;/h2&gt;

&lt;p&gt;So yes, building an OAuth module with the right server, SDK, token management and flows is time consuming and a bit complicated. Most service providers have their own structures and flows that you need to build for. Which means, one size does not fit all. If you are looking to integrate with multiple providers, you will need to go through this entire process again. &lt;/p&gt;

&lt;p&gt;With &lt;a href="https://pathfix.com"&gt;Pathfix&lt;/a&gt;, instead of all that manual work, you can get oauth connected and start using any providers APIs in just a matter of minutes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://pathfix.com"&gt;Pathfix&lt;/a&gt; is a middle API for oauth integrations that gets you connected to any provider with just a few lines of code. It handles the entire framework, token management and servers, without needing SDKs ever, all ready to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference Links
&lt;/h2&gt;

&lt;p&gt;We recommend going through some of these reference links if you are looking to build the entire OAuth structure yourself &lt;a href="https://oauth.net/2/"&gt;https://oauth.net/2/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.oauth.com/"&gt;https://www.oauth.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>oauth2</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Login Management for SPA and Everyone Else</title>
      <dc:creator>Ralph Vaz</dc:creator>
      <pubDate>Thu, 27 Aug 2020 08:42:59 +0000</pubDate>
      <link>https://dev.to/ralphwjz/login-management-for-spa-and-everyone-else-12o6</link>
      <guid>https://dev.to/ralphwjz/login-management-for-spa-and-everyone-else-12o6</guid>
      <description>&lt;h2&gt;
  
  
  Login Vs. Profile
&lt;/h2&gt;

&lt;p&gt;Adding social login to your existing login module has multiple benefits. ( &lt;a href="https://pathfix.com/blog/what-is-single-sign-on-sso-how-can-you-add-it-to-your-existing-login/"&gt;Click here if you want to read why you should add social login to your login module.&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;There are 2 elements to social login management – &lt;strong&gt;Login and Profile.&lt;/strong&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Login
&lt;/h2&gt;

&lt;p&gt;AKA Identity, gives us identifiable information about the logged in user. Login also manages session state for us. i.e. If logged in with Github then every time the user comes to your app and he has authenticated using GitHub they will show as logged in.&lt;/p&gt;

&lt;p&gt;This is a two-step process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check if the current user has previously authenticated with GitHub (usually done by storing a cookie)&lt;/li&gt;
&lt;li&gt;If he has, then combine cookie information with stored token information (in server) and get user identity. Pretty straightforward. &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Profile
&lt;/h3&gt;

&lt;p&gt;Each provider will return some information about the user. This is more than just the login and could include things like name, a profile picture and some form of ID. Let's assume that we use the user's email as the identifier. We then store information against this identifier to Profile the user.&lt;/p&gt;

&lt;p&gt;When I say profile the user, I mean store more information about the user than is provided by the Identity Provider. i.e. Company Name, Designation, App Personalization Information etc.&lt;/p&gt;

&lt;p&gt;With this you have &lt;strong&gt;Login and Profile&lt;/strong&gt; both. &lt;/p&gt;

&lt;p&gt;The code flow to get, say GitHub Identity, would be something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LzYoLrSk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598517250167/pO7XlOWUg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LzYoLrSk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1598517250167/pO7XlOWUg.png" alt="Codeflow for OAuth Login (5).png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above flow, &lt;strong&gt;N5&lt;/strong&gt; gives me the JSON object which is the identity that I am looking for. From here on I take the user identifier (i.e. email) and extend the profile of the user in my db.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Security note:&lt;/em&gt; No login provider, including GitHub, will give you a user ID and password for a user. This ensures security since there are no passwords to maintain, there is reduced chances of being hacked or stolen passwords.&lt;/p&gt;

&lt;p&gt;In the next post, I will share a few code samples behind the code flow.&lt;/p&gt;

&lt;p&gt;Want to add login to your platform? Get your code at  &lt;a href="https://pathfix.com"&gt;Pathfix&lt;/a&gt; .&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>spa</category>
      <category>oauth2</category>
      <category>login</category>
    </item>
    <item>
      <title>Why I built Pathfix, the OAuth middleware for devs.</title>
      <dc:creator>Ralph Vaz</dc:creator>
      <pubDate>Mon, 24 Aug 2020 14:01:30 +0000</pubDate>
      <link>https://dev.to/ralphwjz/why-i-built-pathfix-the-oauth-middleware-for-devs-2coh</link>
      <guid>https://dev.to/ralphwjz/why-i-built-pathfix-the-oauth-middleware-for-devs-2coh</guid>
      <description>&lt;p&gt;I have been a developer all my life (25 years and counting) and I absolutely love it. Coding gives me a so much joy, I always say &lt;em&gt;“it’s not work, it’s a hobby”&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;Over the years, I have built over 8 different SaaS platforms. Ranging from a no-code app development platform to conversational chatbots. &lt;/p&gt;

&lt;p&gt;During each build, one thing always remained a constant need. &lt;strong&gt;Integrations&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;This is a post on why I built Pathfix. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Pathfix?
&lt;/h2&gt;

&lt;p&gt;Pathfix is a middleware API for OAuth integrations.  Engineering teams can add multiple platform integrations directly into their app, in minutes, without ever having to deal with OAuth or manage integration servers. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/vOlxu-pTaAI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  The Motivation
&lt;/h2&gt;

&lt;p&gt;With each development sprint on my previous products, there was always a significant amount that was spent on integrations. My team collectively spent anywhere from 4 weeks to over 3 months just building out the connection to different service providers. &lt;/p&gt;

&lt;p&gt;Why? Its simple really. Although OAuth is an industry protocol for authorization, it servers more as a guideline. Which meant, each provider had their own setup process. Each setup was different. Each connection required hours of research. Each had their own way of handling authorization tokens. &lt;/p&gt;

&lt;p&gt;And of course, there was the SDK problem. To access the providers API endpoints, you need to run an extensive search to find the right SDK for the integration you are building. &lt;/p&gt;

&lt;p&gt;This not only meant ‘getting lucky’ finding the right SDK, it also meant setting up a server, managing the logs, monitoring connections, and maintaining security protocols (you are accessing customer data after all!). &lt;/p&gt;

&lt;h2&gt;
  
  
  Standard OAuth integration elements
&lt;/h2&gt;

&lt;p&gt;Let’s break this down. For you to add OAuth based integration in your platform, you will need to do the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Setup and configure OAuth &lt;/li&gt;
&lt;li&gt;Implement OAuth flow&lt;/li&gt;
&lt;li&gt;Implement secure storage for tokens&lt;/li&gt;
&lt;li&gt;Implement logic to refresh access tokens when needed&lt;/li&gt;
&lt;li&gt;Build and implement logic to properly handle revoked refresh tokens&lt;/li&gt;
&lt;li&gt;Logic to handle reliable issues and outages&lt;/li&gt;
&lt;li&gt;Build and implement systems to track errors&lt;/li&gt;
&lt;li&gt;Find and implement the right SDKs&lt;/li&gt;
&lt;li&gt;On-going server maintenance &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To add 5 integrations, this could take over 2000+ engineering hours to get done. Which is approx. $160,000 (yes, we did the math, we had to).&lt;/p&gt;

&lt;p&gt;This is why I decided to build Pathfix. &lt;/p&gt;

&lt;h2&gt;
  
  
  OAuth Integrations With Pathfix
&lt;/h2&gt;

&lt;p&gt;Pathfix is the only API you need to integrate with any provider. It handles all the configuration and framework required to build integrations to any platform and access any providers API endpoints. It is a pass-through server that handles user authorization and API requests between platforms. &lt;/p&gt;

&lt;p&gt;And of course, its all white-labeled. Users never see Pathfix anywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorizing Users&lt;/strong&gt;&lt;br&gt;
A simple one line code that enables user authorization&lt;/p&gt;

&lt;p&gt;Sample Code for Authorization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div data-oauth-ui="list" data-oauth-ui-switches="checkBoxes,statusOn,disconnect" data-oauth-ui-providers="" data-oauth-ui-providerTypes=""&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pass-through API&lt;/strong&gt;&lt;br&gt;
Once authorized, use the pass-through API code to access any providers API endpoints&lt;/p&gt;

&lt;p&gt;Sample code for pass-through API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://labs.pathfix.com/oauth/method/googleanalytics/call?user_id=AcmeSaaS_end_user_id&amp;amp;public_key=733AC521-199E-496C-8250-FFCAD67355AB&amp;amp;private_key=E7804D26-0625-428F-8550-CDF073D3CF61                            
Content-Type: application/json
{
    "url":      "url_to_googleanalytics_API",
    "method":   "method_to_use_with_this_call",
    "payload":  {payload_as_requested_by_googleanalytics},
    "headers":  {header_if_requested_by_googleanalytics}
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That’s it! &lt;/p&gt;

&lt;p&gt;Compare it to the code and time you would need to create and maintain, Pathfix solves it in the most elegant way. With:&lt;/p&gt;

&lt;p&gt;√ No additional code to maintain&lt;br&gt;
√ Zero learning curve&lt;br&gt;
√ Log monitoring&lt;br&gt;
√ Secure encryption&lt;br&gt;
√ Firewall settings&lt;br&gt;
√ Notification engine&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pathfix.com"&gt;My site URL&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>oauth</category>
      <category>api</category>
    </item>
  </channel>
</rss>
