Oauth Authentication (possibly with Pathfix?

I did some research and I think this is really interesting to add to Glide (given the low complexity but huge return) so I am adding it here. Apparently there are some really easy-to-use Low Code OAuth services like Pathfix (this seems the best) which let users of your app authenticate using OAuth on hundreds of other applications (Drive, Dropbox, Calenar, Fb etc) so that you can use their specific data. (vs now you can connect to one google calendar for your whole app) They handle all the difficulties of OAuth and give you a simple API of Pathfix you can use to create calls to all the services a user authenticated to.

The only thing which is missing in Glide is the ability to add the below code to a page/header (with the user-id filled in by glide, probably just the emailadress (or maybe you can also choose the role so that users sharing a role can also share the connection to a third party app so that they have access to the same 3rd party data) to let users authenticate and a way to store in Glide which user/role has authenticated for which service.

Given that an implementation with Pathfix would be pretty simple for Glide to implement, it would be a super cool feature to add as this would effectively allow for more individualized experiences for each app user.

This would be handy to allow my users to pull in their data from other platforms. I wonder whether the web embed module could be used here as an interim workaround?

Interesting…would love to see an example of this.

That’s actually a really good Idea. I don’t know if it’s going to work but I am going to test it out!

I don’t think it’s currently working with Glide (unless the iframe method is working but I don’t think so).

While I didn’t use Pathfix, I did manage to set up Oauth with Glide + Make.

Use case:
Allow my users to connect their own HubSpot accounts to their profile in my Glide project. This allows each user to pull in data that’s relevant to their business (ie contacts, deals, etc). You could do this for any platform.

High-level steps:

  1. Create a new Make scenario with the first module being a Custom Webhook.
  2. Copy the webhook URL and use it as the Redirect URL in the platform you’re setting up OAuth in (HubSpot in this example). This will generate an Install URL.
  3. Copy this Install URL into a template column in Glide and add &state=@ to the end of it. Then, replace ‘@’ with the RowID. This will ensure you can link the Oauth back to your users/row in Glide.
  4. Test the Install URL. It should send an authorization code to your Make scenario.
  5. Connect a HTTP (Make a Request) module to the first module (Webhook).
  6. In the HTTP module, send the authorization code received in the first module to the platform’s API and request the tokens. Refer to the platform’s API documentation for the specific API call.
  7. Connect a Data Store (Add/replace a record) to the HTTP module. Set state as the key from the webhook and record the Refresh Token and Access Token.
  8. Optional: You can then use a HTTP module to send these tokens back to Glide.

Oauth tokens only last around 30 minutes before they expire, so we need a way to refresh them:

  1. Create a new Make scenario with a Data Store (Search Records) module as the first step. Configure it to use your data store and filter by Refresh Token Exists.
  2. Connect an Iterator module if you have multiple tokens to refresh.
  3. Connect a HTTP module and send the Refresh Token to the platform’s API to request new tokens. Refer to the platform’s API documentation for the specific API call.
  4. Connect a Data Store (Update a record) module and set the key as the state. Map the HTTP’s output to update the relevant sections of your data store.
  5. Set the first module to run every 29 minutes, daily, or whatever frequency you’d like. All done!

I’m sure there’s steps I’ve overcomplicated too. Would love to see how others refine this further!

2 Likes

Hi Rev!

Wow, thank you for giving such a detailed explanation.
I was thinking about Make for a while already to do this but given that I haven’t actually ever created an OAuth Connection, I was postponing this haha :wink:

I am going to test it out this week! If it works, I am coming back with a video of the setup, otherwise I’ll be asking some more questions haha :wink:

This shows again how powerful a full No Code stack can be :o

1 Like

Thanks everyone! I’m somewhat surprised the Glide Call functionality doesn’t have native support for OAuth. Am I missing something?

How are users expected to call secure API’s with 2 or 3 step OAuth (or any other security model)?

Call API is brand new to Glide. I bet Glide will get there eventually.

1 Like

I really hope so but I wouldn’t be surprised as you see how fast Glide is moving! :smiley: