How do I authenticate the source of my javascript - javascript

I'm using particles.js as background on a website and have recently implemented a SSL certificate which has disabled it and in Chrome I get a notification saying: 'This page is trying to load script from unauthenticated sources' I'm presuming it will be a similar message for Safari and Firefox.
Both parts the particles.min.js and app.js files are being hosted on my servers and I'm using Wordpress as my CMS. When I allow the script to be loaded all is fine.
How would I resolve this?
Thanks
J-P

Related

Shopify embedded UI does not load in the embedded iframe on initial install

Submitted my app a few weeks ago and it got rejected, one of the problems was this:
Upon installing the app, I am being redirected to a non-embedded
version. When accessing the app from the installed apps list, the app
is redirecting to the embedded version. This occurs when an initial
OAuth request redirect fails to escape the iframe. Refer to our
embedded app OAuth doc. Please see this screencast for additional
details.
My app is working functionality-wise, and I've been able to test with a few client stores on an unlisted install.
The UI is hosted on a Google Cloud Bucket behind CloudFare for SSL and loads fine AFTER the initial install, when the user goes into the App Page in their admin dashboard -- it actually loads as an embedded app in an iframe.
The only issue is that on initial install, the UI loads the non-embedded version. I've tried a bunch of things with iframe escapes but nothing seems to be working.

Cannot connect to Youtube Data API V3 with javascript

So I'm building a Phonegap app and I need to access Youtube's Data API. I managed to access the simple API (The one that requires an API key) yet I'm having trouble connecting with OAuth.
I did everything the walkthrough guides told me to do, I have generated a Client ID for Web application from https://console.developers.google.com.
I'm using the auth.js file from their example at the google developers website
The main issue is that every time I try to log in, I get this error:
Refused to display
'https://accounts.google.com/o/oauth2/auth?client_id=' in
a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
I tried clearing my cookies but to no avail.
I run this on localhost with Visual Studio, maybe this has something to do with that?
Ok, so after spending some time on it I finally figured out what the problem was.
On https://console.developers.google.com when I created my OAuth 2.0 client ID there was the "Authorized JavaScript origins" field which I left blank. Since I was running it from my localhost, I added http://localhost:28299 to the list of safe origins and everything worked fine.
Of course this is just for the development phase.

Safari SSL certificate issue and external javascript

My site is running on SSL. On one of the pages I am calling an external javascript required for integration of Birt iHub into our application. The iHub application is running separately on of o our servers and javascript also resided in same application. Now when I try to acces the javascript without SSL it is blocked as my site is running on SSL. So I also put the iHub app on SSL so tha my website communcate with javascript over SSL. Now it works fine for both Chrome, Firefox and IE but in case of Safari it worked for few days then suddely an SSL error shows up. I have delete the SSL certificates from cache and the access the site again and IT worked again but afeter some days same issue occurs. AndI have to delte it again to make it work.
Can anyone tell me whay this is happening and what could be done to avoid this

How to get Google Drive API example to run in Phonegap application (support for Android)?

I have successfully been able to use the example provided for the Google Drive API to authenticate and get files & folders of a user's Drive (https://developers.google.com/drive/web/quickstart/quickstart-js).
But I need to convert this example to be able to launch on an Android device using Phonegap. When I run the Phonegap application I get the following error:
Refused to display document because display forbidden by X-Frame-Options.
I have had a look at some answers for dealing with this error for other applications such as including SAMEORIGIN for X-Frame-Options in the meta tag and running the application in the emulator to see if it works but it does not. I have also made sure that the inAppBrowser plugin has been added.
Note, I am using localhost to test the application. I'm not sure if this will cause an issue.
I'm not sure how to solve Google Drive authentication in a Phonegap application.
I'm not sure what your issue is at this point, nor what you are ultimately wanting to do with your app. Consider looking at Filepicker.io as a PhoneGap integration point for Google Drive. Filepicker.io Home Page and the github repo for the plugin

Javascript and Jquery - IE blocking it running (Galleria)

I have linked to the Jquery library at google in my header, and my local copy of the Galleria Javascript file - as the instructions on the Galleria website said to do.
The code functions perfectly in Chrome. However, when attempting to view the site in IE9 I am faced with "Internet Explorer restricted this webpage from running scripts or ActiveX controls." This is preventing (without user input) the Javascript/Jquery/Galleria stuff to function; it is also prevented an embedded Youtube video from displaying.
What am I missing - plenty of other websites use these functions and I don't get IE giving this message. What do I need to add or change?
I am viewing the website from my PC - it is stored locally at the moment.
Cheers!
This is happening because you are running your website locally. You can be sure that this will not happen once you upload it to a webserver.
You can also run a local webserver. I can recommend WAMP:
http://www.wampserver.com/en/

Categories

Resources