Spring social Authorisation Exception with Facebook - java

My website has suddenly started reporting this error when ever anyone logs in with Facebook:
HTTP Status 500 - Authorization is required for the operation, but the
API binding was created without authorization.
type Exception report
message Authorization is required for the operation, but the API
binding was created without authorization.
description The server encountered an internal error that prevented it
from fulfilling this request.
exception org.springframework.social.MissingAuthorizationException:
Authorization is required for the operation, but the API binding was
created without authorization.
I have not changed anything relating to Facebook logging in recently, so why might my website be suddenly giving this error?

It seems that version 2.2 of Facebook's Graph API (which is used for this kind of thing) ceased to be available on 25/3/17: See https://developers.facebook.com/docs/apps/changelog. Hence, the sudden change in behaviour in spite of there being no change to my website.
My website uses v1.1.0 of the spring-social-facebook library. I suspect this is the problem and that I ought to be using v2.0.3: http://projects.spring.io/spring-social-facebook/. However, I don't have the skills to take this any further.

Related

Getting a 401 Unauthorized Error when trying to access reports from the Google Alert Center API

I just had a query regarding a 401 Unauthorized error I seem to have run into while developing a script to pull reports from the Google Alert Center API. I am using the quickstart with a service account and the applicable scope. I have also followed the guide and the credentials.json for the requisite service account seems to be correct as well.
This service account has already been granted Domain Wide Delegation and permission to access the SCOPES. I have also configured the service account to be trusted in the API controls dashboard.
Here is the complete error message.
Just to be extra sure, I have also added permission for a user 'admin#xxxx.com' to use the service account as a resource.
Specifications:
Windows 10, Java 16, Eclipse IDE, Maven 3.6.3
Could anyone help me figure out what is wrong ?

Error of connection with SAML and Spring Security

I'm using Spring Security 4.2.13.RELEASE and spring-security-saml2-core 1.0.10.RELEASE.
The idp is Google (and I don't have access to its configuration).
My application is run on a tomcat-like server. After this short briefing, my issue!
Often, users complain about problem of connection, they are connect to their idp and when they try to access to my application they go to an error page. This page explain "Authentication Failed: Error validating SAML message". If they empty their web browser cache, they can have the right redirection to the idp and connect to my application.
Why appear this error? It seems configuration is right if they empty their cache.
I have change session time of tomcat to be the same of the idp, I also change maxAuthenticationAge and maxAssertionTime of WebSSOProfileConsumerImpl and WebSSOProfileConsumerHoKImpl but it seems the problem is steel here.
What should I do?
I have change the log level. The error was a session duration too short.
On the log, there is a stack exception bug this stack is only shown in debug mode.
maxAuthenticationAge was the right property to modifiy, I made a mistake on duration computation.

google app engine 500 Unknown error

While calling endpoint API, sometimes we are getting 500 Unknown error from server, but most of the time API works fine. And also in case of 500 Unknown error, we are unable to see any logs in google console logs.
API response takes 2 sec approx. We are using App engine Java deployment.
Can anyone help me find the root cause of this problem?
Following is the chrome console error
/conge-portal/#!/dashboard/myage:1 XMLHttpRequest cannot load https://a-master-server.appspot.com/_ah/api/ageEndPoint/v1/aghie…5648/674390454714943921958166322392772?showTarget=true&month=May&year=2017. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 500.
From the error message, it looks like browser rejected a preflight CORS OPTIONS request because "http://localhost" is not listed as the the allowed origins.
Are you using App Engine standard or App Engine Flex environment? CORS handling are different on these two platforms.
Issue stopped after migrating to endpoint framework 2.0

Google Cloud Endpoints Internal Error response (500) with no logs

I've seen that sometimes the OPTIONS request fails with an internal error (500) but i can't see any logs regarding it on the log viewer. It fails before reaching my Cloud Endpoint implementation and i don't even know where to start looking for the possible cause.
Is there any known reason/cause that could generate an OPTIONS request to fail with an Internal Error?
Note: I'm using JAVA runtime.
Thanks.

what is alternative solution for Removing display=wap Dialogs in Dialog Parameters of Facebook authentication?

Currently i'm authenticating my facebook application passing parameter display=wap along with my authentication url. But it shows an error message :" An error occurred with 'App' on Mobile. Please try again later.
API Error Code: 11
API Error Description: This method is deprecated
Error Message: Display=wap dialogs have been deprecated. You can temporarily enable them by disabling the 'july_2012' migration. They will stop working permanently on July 1, 2012."
When i disabled the 'july_2012' migration the authentication working properly. So how can i handle my apps after July and what is the proper & permanent solution for this issue.
Hi display=touch must work , If it does not work Use Display=page , This automatically converts facebook authentication for mobile site.
You just need to update to PHP SDK 3.0

Categories