facebook login is'nt redirect back properly - laravel

Working with Laravel 5.2
Using SammyK/LaravelFacebookSdk
I have an web application witch users can vote in each category once so before they can vote they have to login to facebook everything working fine until it comes to the redirect the user to the page with message like thanks for voting here is the application on the internet Here
Now whenever the user click on vote I get different responses on my PC on
chrome everything working OK
on Firefox and other devices Not working
Whet happens is is the voting done successfully but the redirect back not
it go to this URL
https://www.facebook.com/v2.9/dialog/oauth?client_id=139382809958016&state=d517376c10784f6b5f718112a7c49b83&response_type=code&sdk=php-sdk-5.5.0&redirect_uri=http%3A%2F%2Fsatfestival.net%2Ffacebook%2Fcallback&scope=email%2Cuser_events#_=_
and redirect back to this URL
satfestival.net/facebook/callback/?code=AQApHGQa5LtqLSv75bq8V6QA_6I9ivmKJ07kcO3aYY7pCmSIYoPu8lzrZhRSGYXg7weiOgIa5c1vKDchsbVepn0-LH9rh1kUKgpcJ71DFtYqbZLMLfEYD1DJWmqyqoFS_RL03b2IhZx62LP8NyepCZ0zTn8auxzGN2-jhtZ-YHVFPuGlJI31UnCc7ymhCXu1Zie8hMxp38z5CvPrhE5lDEEQjDgXqz2o45XTsOR3WaJfbEx51yscGx4SFr0Gtl6DKSTXol-3tkqkMZ3JhP7-JXk7RHwj1c3PhDTwXcgc6c8gq4qOMSwaR_EWnZtn8vX5ICc&state=d4e6fd2949abda8f85810e36a4a3fc35#_=_
and again redirect to the first URL and back to the second URL and so on.
Here is a screen shot of the Facebook Client OAuth Settings
if someone like to see the controller I will provide the controller too.

Related

How to display the facebook oauth2 login in a popup?

I followed this tutorial (https://spring.io/guides/tutorials/spring-boot-oauth2/) to create a facebook oauth2 login and it's working fine.
Once I click on the login button it redirects to the facebook page and after the user logs in it goes back to the application.
Now I want to modify the code so I can have a popup instead of redirecting the application to the facebook web page. I'm trying to find some material on how to do that, but couldn't find anything so far.
Does someone know what needs to be done or have some link / article on how to do that?
Thank you!
That has to be done in the javascript front end. From https://developers.facebook.com/docs/reference/javascript/FB.login/v2.12
Calling FB.login() results in the JS SDK attempting to open a popup window.

Forms authentication - keeping user logged in after redirect to Paypal

I have a shopping cart in my Umbraco site - when the user clicks pay they are redirected to Paypal to pay for the contents of the cart. Once complete, Paypal redirects back to my site courtesy of a return url I specify in m post data.
The return url is a page that contains a list of purchased subscriptions for that user and they need to be logged in to view it. Since they have to be logged in to click the button that takes them to Paypal I would have expected them to be still logged in when Paypal redirects back to my site but they never are.
I've tried increasing the timeout in the web.config forms element but this has no effect. It's weird, I can shut the browser down & reaccess my site and still be logged in - it's just this post back from Paypal that seems to screw it up. Anyone have any ideas?
After a little more digging as suggested by pc-pdx the problem was that my auth cookie was getting generated for www.mydomain.org.uk but the Paypaf return url was specified as http://mydomain.org.uk.
I changed the return url to http://www.mydomain.org.uk & it fixed it.

failed to authorize twitter when trying to authorize app with windows phone 8/8.1

I've got a windows phone 8/8.1 app which contains a page with an embedded web browser on it. I build a list of articles extracting information from the website and all of this works fine but note that I only use this web browser to display an article when a user has clicked on the item in my list.
The article in question provides a button to allow user to leave comments via twitter. At the bottom of each article there is a "Twitter Log in" button. When I click on it, it brings me to the authorizing page and it displays the news website as the app I want to authorize.
After entering my twitter credential and clicking on the "Authorize App", I get the following error:
Exception of type 'Microsoft.Phone.Controls.WebBrowserNavigationException' was thrown.
Then a Twitter webpage gets displayed display the following:
There is no request token for this page. That's a special key we need from applications asking you to use your Twitter account. Please go back to the site or application that sent you here and try again. It's probably just a mistake.
It definitely authenticated me as I can see my Twitter account picture but it failed to authorize the app.
I understand that my app is not the original website as it is a wp8/8.1 app but what I'm calling in the web browser is the page that contains all the original code from the news website and therefore you would assume everything would work as if I was calling the website directly from a browser.
If I call the website from the browser that comes with wp8/8.1, it works as expected!! Strangely enough they have the same functionality but using facebook and this works as expected.
I've had a look at html the "twitter authorized page" when called from my phone and when called directly from my web browser on my laptop and while I can clearly see the form contains an hidden field for authenticity_token with a value and a oauth_token with another value, they do differ.
I don't know if they're suppose to be identical but as I said, I don't understand why this wouldn't work as when I display the article in the embedded web browser, you'd assume that everything else that goes on after this would behave as it would in a regular web browser and when this 'authorize app' button is clicked, you'd assume that all values would be passed as normal and the app would get authorized but nope!!
Any suggestions on how I could possible resolve this problem?
Thanks.
I can't really tell what's going on, but it looks like you would have to implement Twitter OAuth. Luckily for you there is already a library that can do that - https://github.com/konradbartecki/TwitterAutherino
I am the author of this library, so let me know if you need some support or non-existent features.

How to embed facebook / twitter login into my site asynchronously

I want my site users to be able to login using facebook/ twitter login. I found the code from facebook/twitter developer page. This is working fine. But i wish to implement these code through asynchronous(ajax) request. Something very similar to http://list.ly login window.

facebook redirect entering an endless loop

I am using v 5 RC and the CSMvc3FacebookApp.sln sample.
When I launch the site locally (using IIS Express as WebServer) by browsing to:
http://apps.facebook.com/myTestApp
HomeController/Index View shows up properly. This means that the facebook settings are correct.
However when I hit the 'About' link (this is where the facebook calls are made) I see an endless loop occur between:
http://apps.facebook.com/santiagoit/Home/About
http://localhost:16874/facebookredirect.axd?code=
If the user is not logged in to facebook. Hitting the 'About' link brings up the facebook login page, endless redirect loop happens after user signs in to facebook.
I tested other sample projects and they behave the same.
I tested with another facebook test app and same results.
I had done a project with the older facebook developer toolkit, but I am new to this SDK.
Any ideas what is going on?
Thank you!
please take a look at the latest docs on the authentication in facebook. They have discontinued the previous protocol for authentication. Now they use straight OAuth2.

Resources