I’m new to bubble so please excuse my ignorance. I creating an application that won’t need or have a user login or name but will be invoked by another application from a specific domain. I only want to allow the bubble app to run if it is invoked by that specific domain. I’ve tried using plugins for referring URL, and get url parameters, but it seems those fields don’t populate without a user. My preview mode see’s the URL, but when I just type the bubble app url in a browser, the referring url in bubble is blank/null. I’m sure I’m missing something ?
That’s bc when you just type it in the address bar there is no referrer only when coming from another site.
That would be ok because null or blank would not be an authorized domain. Problem is when invoke the bubble app from an application that is running in the domain (via an external url call), it too is blank which is the problem. Maybe there is another way to ensure the user is running from my other app, and I’m open to suggests. Thx
Plug-in may be broke.
Use toolbox js action and do
document.referrer
Return the value and if it’s not the expected domain send it to an unauthorized page.
@mike.kallet , for what it is worth I had the same problem and almost the exact same use case, and using Toolbox as @chris.williamson1996 suggests here was the only way I ever really got it to work.
I’m not a coder, which is why I trying to get bubble to work. Don’ t have a clue as to how / where and to use the toobox js. I’ll give it a shot. thx
Toolbox is a plugin
Run JavaScript is an action it contains
Copy and paste this
I’m not a coder either, but ChatGPT helped me implement the Toolbox plugin (It suggested it, I didn’t even know it existed) and then write the code it took to make it work, which was only a few lines.
(And actually, ChatGPT is surprisingly knowledgeable about a lot of stuff in Bubble. It only struggles when I don’t know a good way to ask my question, in which case, the folks here are usually able to figure out what I’m asking, haha.)
Ok, I’ll give it a shot. I’m a newbie at bubble.io so If you have the time and don’t mind sharing, step by step instructions would be great. Am I going to have the same issue passing params and with the get data from the url? 30+ years ago I was a cracker jack C programmer, so coming up to speed on visual programming has been interesting to say the least. Thanks in advance for your help.
Booyah ! It worked. Took your (adam5) advice and got gpt to give me instructions. Looks like it was using a little older interface, but close enough for me to find stuff. Now to work on the parameters. THANKS so much.
Well I spoke to soon. This is the java code I used:
var referringURL = document.referrer;
bubble_fn_storeRefURL(referringURL);
and I put storeRefURL.value into a text field with the insert dynamic data and it displays fine. So in the test stage, the url is https://bubble.io. Trouble is that I can’t seem to test it. For example in a flow if i set the condition such as storeRefRUL value contains “bubble.io” this fails. I"m at a loss when it comes to being able to check it. Any suggestions? Thx