Setting up an OAuth Redirect URI

Does Ottomatic have any means for setting up an Oauth Redirect URI? If not, is it possible to use Webhooks to obtain the response?

Hello Brian,

Welcome to the Ottomatic Community :slight_smile:

A redirect URL redirects the user to a new window or app. So Webhooks won’t help here as they are not happening in the user session, but in the backend. But it is sort of a similar thing so I get the reasoning.

Once way we have done this in the past is to do the Auth Flow from an embedded browser using a web viewer then it is pretty easy to use the JS function to get the response back, since the JavaScript can call a script.

Can you use a web viewer in your case?

Todd

Thanks!

Trying to integrate with TeamWork. The webhooks worked so nicely, but now I’m having to also poll it for other functions. In setting up an app in their developer portal, they require OAuth, which requires a Redirect URI. So, they’ll never be an interface for it. I was hoping there was an easi(er) non-code way to get the response…

Redirect can often be any page on a website you control, all you are usually looking for the code added to the URL as a query

or you have a looping script to a FM webviewer to wait for it to contain the code;

@Kyle - would equally be very interested in your JS function to do the same job

Hey y’all,

I am currently working on a redirect flow that works with a FM app, but it requires a separate web app that you control to do the redirect flow portion.

In my case, I use FileMaker to open up a url to my web app in an external browser which I add the filename to as a query parameter. Then, in my web application I do authentication and whatever else I need. Finally I redirect back to the FileMaker file using an fmp url, to which I add a token as a script parameter so that I can use it to authenticate.

If your redirect flow is something similar to:

  1. Leave Filemaker to an external site for authentication
  2. Authenticate at that site
  3. redirect back to FileMaker

You may be able to do this using FileMaker natively as I have, but it requires a fair degree of control over the url that gets sent back and how that data is formatted.

Redirect URLs can work differently depending on the type. In this case are you simply entering a redirect url into TeamWork that TeamWork will redirect back to as part of the OAuth flow? If the redirect url we are discussing is the url to be redirected back to (with whatever auth information you’re getting), you could presumably use a webhook for this.You would probably need to use the “includeHeaders” query parameter in your url so that you get the auth information back from the url if they are sending it in the headers.

That is my long winded way of saying:

  1. If you’re trying to do the redirect yourself, webhooks would not solve your problem, you’d need to do some webveiwer or external web setup to make that work (although there may be a native filemaker pattern I’m unaware of).
  2. If you’re using the redirect URL to put into a third-part system that will use it as part of this OAuth flow, it depends a lot on the third-party and their technical constraints. You may be able to use webhooks for this situation.

I hope that helps!

-Kyle

Kyle and I just discussed a “redirect” feature which we think we think will make this much simpler. I am not sure when it will make into the product but it isn’t too hard so I think it will be relatively soon.

Stay tuned

Todd

@toddgeist You guys are amazing. You continually go head and shoulders beyond anything else out there in the FileMaker world, once again proving the value of P+G being the ONLY 3rd party mention of hosting services in our upcoming book! :sunglasses:

But yeah, this is super helpful for scenarios where a server is doing the authentication. Not sure if it’s still the case, but Google used to require the request to occur at least once from the same IP address that will token will be approved for. Not sure how to physically do that on one of these servers!

2 Likes

Hey Brian,

OttoFMS 4.7.0 includes a fm redirect url which you can tie into a filemaker file/script to get oauth redirect information. Check out the docs page for more information on it and how to use it. Thanks for the suggestion!

-Kyle

1 Like

I am genuinely impressed. You guys are amazing!!!

1 Like