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?
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:
Create a new Make scenario with the first module being a Custom Webhook.
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.
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.
Test the Install URL. It should send an authorization code to your Make scenario.
Connect a HTTP (Make a Request) module to the first module (Webhook).
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.
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.
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:
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.
Connect an Iterator module if you have multiple tokens to refresh.
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.
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.
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!
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
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
This shows again how powerful a full No Code stack can be :o