I configured my project first with passport-google-oauth20 authentication and it was working fine.
I added the passport-facebook after that and its working fine as well, however, after logging/registering with my FB account my redirecting URI which is supposed to be "http://localhost:3000/home" shows "http://localhost:3000/home#=" instead. It isn't showing any errors in the console and also working as it is intended to. I've got no clue what part of code I'm suppose to share with you guys as the functionality of the project is intact, so please let me know the snippet which may help you to better understand the issue.
This is not a problem itself.
https://github.com/jaredhanson/passport-facebook#why-is-__-appended-to-the-redirect-uri
Related
So I have a website on Google Sites, and I want to add a 'random post/page' button. I found this code on GitHub and edited it by putting my own URL's. Everything works according to plan except the code uses cookies, basically you go to the link once, it redirects you to a random URL that you have chosen, and it saves that URL. I want to make it so that it's always random, no cookies. I've tried altering the code but nothing seems to work since I don't know much about code, except for the basics. Could anyone help remove the use of cookies of this code? You can view the code below. Thank you.
This is the GitHub code
I tried deleting any code that I thought could be related to the cookies, basically the bottom of the code. The code still worked, but the cookies we're still saving. Like I said, I only know the basics so I was just deleting and praying it would fix it.
Can be massively simplified if you don't need the cookie functionality:
const redirectUrls = [
"http://www.aftonbladet.se/",
"http://www.dn.se/",
"http://www.svd.se/",
]
document.location = redirectUrls[Math.floor(Math.random() * redirectUrls.length)]
I am nearly done with my code for my new Website but am really bothered that the following gets somehow logged to my Chrome-Console:
For instance, it gets printed when I switch between pages of my Website (using react-router-dom). I am not consciously injecting any script (nor do I know how that would work or why I would do such a thing).
I don't even know what "allpages.js" is, I never came across it so far.
If I click on it, to see the area that throws the error, I get the following (it is on line 83):
Happy to provide any further info or code and thanks everyone!
Note: The issue is also reported on GitHub. Please take a look at Git issue as well for current progress/investigation.
I'm using fhir-client v0.1.15 to develop a SMART on FHIR web application that would run in EHR launch scenario. For example in Epic Hyperspace simulator that uses IE to run the SMART application.
While testing my application locally(localhost) on IE11, I get a JavaScript error from within fhir-client.js.
SCRIPT1014: Invalid character
File: fhir-client.js, Line: 38113, Column: 3
Below are the two lines from code. 38112 & 38113 in order:
var ret = Adapter.get().defer();
var state = JSON.parse(sessionStorage[params.state]);
Any solution or workaround would be much appreciated.
Updated
Upon further investigation we found that sessionStorage is empty when line with JSON.parse executes. However, strange thing is why/how sessionStorage gets empty after redirection from authorization server. This only happens with IE11, everything works fine on Chrome though.
PS. Can someone please add a new tag SMART or SMARTonFHIR?
Though I couldn't find the exact root cause and solution but let me share the findings that helped me resolve this issue somehow.
The issue doesn't exist when I test my SMART application with redirect_uri(in FHIR.oauth2.authorize call) set to a staging server URL instead of localhost.
PS. I’m open to better, and more qualified answers for acceptance.
I'm using a JavaScript, along with PHP, to create a login system for a project I'm working on.
I have everything working in regards to actually logging the user in, and then checking this within my JavaScript. However when I redirect the user from the login page to a private page, I'm having issues with window.location.href in the JavaScript.
I own the domain thomas-smyth.co.uk, so I have tried the following piece of code to redirect the user.
window.location.href = "http://thomas-smyth.co.uk/home.php";
However, when this redirects me, it is redirecting me to thomas.smyth.co.uk, which obviously causes the page not to load. Any ideas on how I could fix this?
Thanks in advance,
Tom
You have posted the wrong code. In your Js File thomas-smyth.co.uk/functions/login.js on your webserver is this:
//Re-directs to subdomain.
window.location.href = "http://www.thomas.smyth.co.uk/home.php";
this should be fixed to
//Re-directs to subdomain.
window.location.href = "http://thomas-smyth.co.uk/home.php";
#vlaz mentioned right, you have a second mistake with a wrong dot instead of a dash
And btw you should explain your problem a bit more. More code would be usefull next time if you want some help.
i am trying to refresh a particular area of my php page, which will load the updated information from database. My code are working on localhost. But, when the same code i'm trying to execute on my domain. Then, it is not refreshing and not showing updated information, and i don't why... Anybody have any idea..
setInterval(updateShouts, 10000 );
function updateShouts(){
$('#refresh').load('ajax/check.php');
};
this is the code, which i'm using for refreshing the
.
I'd check that the URL is correct:
You can use Firebug (or another Javascript debugger) to watch the request going out, and you can see if it was a 404 error or if it worked.
Also, in the Console, just type in $('#refresh') and make sure it returns an actual object.
if it just displays [] or undefined, then the selector is wrong.
Try:
function updateShouts()
{
$('#refresh').load('ajax/check.php');
};
setInterval(function(){updateShouts();}, 10000 );
Problem is with most localhost dev servers the configuration, security, etc.. is usually at the load end of the scale vs a host else where. So that may or may not be part of the issue, I couldn't say for sure though
Edit I agree with the notion of checking to make sure the path ajax/check.php is valid also. And that Firebug is a very handy tool to have when developing with jquery (or javascript stand alone)