[New Feature] Using a generic redirect URL for OAuth providers

Some providers, such as Facebook, are being more strict about having an exact match between the URL your app is on when the user logs with the service, and the redirect URLs defined in the app’s definition (for instance Facebook).

This can be a problem when a lot of pages have a thing as content, hence leading to an ID in the URL. To solve this issue, we’ve enabled a way to use a generic URL as a redirect URL. If you check the box in the plugin’s settings in the plugins tab, and add the URL

https://yourdomain.com/api/1.1/oauth_redirect or https://appname.bubbleapps.io/api/1.1/oauth_redirect

It will work from any page of your app.

23 Likes

Yes! This has been an issue with Linkedin for a while.

@andrewgassen ^

1 Like

Yay! Fantastic

Sweet! Is this Facebook only? How is this functionality going to work when using a Bubble app as Oauth provider?

This should work for all OAuth2 providers

3 Likes

My Oauth2 user-agent connections to paypal and google seem to have broken around the time this was added…I no longer reaching the login redirect url, it just spins forever. Perhaps related, I do not see the checkbox for generic url on the api connector plugin–not sure if it is supposed to be there???

Anybody else having issues?

–Ken

1 Like

same issue! it seems I can not authenticate with my API connector too

We’re going to need a bug report

bubble.is/bug_report

Submitted.

I have submitted it too. hopefully we will get this resolved.

Issue was solved quickly! thank you @emmanuel

Everything resolved for me as well. Thanks guys.

This is awesome!

Do we have to add another URL for the dev version?

https://yourdomain.com/api/version-test/1.1/oauth_redirect
OR
https://appname.bubbleapps.io/api/version-test/1.1/oauth_redirect

Actually this will work with the live version url even when using the dev version, though it won’t hurt to have both.

@emmanuel is there a way to specify the redirect_uri you want LinkedIn redirect the signed in user after they authorize?

Right now it takes them back to the signup page after successful authorization and a few seconds later goes to the dashboard which is pretty confusing user experience.

Any insight would be very helpful

3 Likes

We currently don’t expose that, but i agree it’d be better. We’ll think about it.

1 Like

I’m happy to open a pull request if you’re github repo for the LinkedIn plugin is public. Let me know please

It seems as if the “Use Strict Mode for Redirect URIs” is now required by facebook. I have parameters in my url that are coming across as invalid. With this said the checkbox is outdated on this api. Is there any work around for this now that facebook updated the requirement?

Artur,
any ideas on how to solve this? I have the same issue using Google.
Thanks,
René

I basically had to create another page /oath and in there I had an On Page workflow that checked if we didn’t have the user’s LinkedIn email, it would login with LinkedIn and then create a new user, but if we had the LinkedIn email it would go to a page in my app.

here is an example:

1 Like