You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to recover user profile but after doing the call and getting the Manager (see below), when I try to get profile by getting the the provider with the manager I always get the exception:
SocialAuthConfig config = SocialAuthConfig.getDefault();
config.load(props);
manager = new SocialAuthManager();
manager.setSocialAuthConfig(config); // this is NOT null
...
/* alter calling facebook and returning the my URL I try */
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
Map<String, String> map = SocialAuthUtil.getRequestParametersMap(request);
if (this.manager != null) {
//AuthProvider provider = manager.connect(SocialAuthUtil.getRequestParametersMap(request));
AuthProvider provider = manager.connect(map); // ERROR here
this.profile = provider.getUserProfile();
// Do what you want with the data (e.g. persist to the database, etc.)
System.out.println("User's Social profile: " + profile);
// Redirect the user back to where they have been before logging in
FacesContext.getCurrentInstance().getExternalContext().redirect(originalURL);
} else {
FacesContext.getCurrentInstance().getExternalContext().redirect(externalContext.getRequestContextPath() + "/pages/home.jsf");
}
Exception: org.brickred.socialauth.exception.SocialAuthException: Verification code is null
What is this "Verification code"?
When Facebook redirects back to my URL it comes with this: /home.jsf?code=AQC1B1a4QDhkfQVtzCmXarf_fR4ZKbCVczKJ1kdDdcegN8l37C8uJ7afKNKSDWbTd0kupObDVMmJznfBGGhhCntSblzdFlaphIGfBpSEpGAZhbLSbckjQ6EIuBEbaauOb2yHUyUisiCKAwpfdCYt-NBN990HpuSo0UHeeUcIy34TbT_2Yy5H6-mKgc-LD9b0idDEEfCnty6qsU71uklLPKgq7n4FvZe00_-pRY5wOz2Pr-TORdOh62HI7GbjabLvUopl46cv6S2sG4Jw-RZU26w1GC9t7LIIbNXVRfaiiBedFm_Angu_vl-9TcZWBTVen-YDWrQfHos4Mq5RTIYh5DIz#=
What should I do with this code?
Appreciate any help.
Thanks
The text was updated successfully, but these errors were encountered:
Access your parameter map and try to get the value for "code" key and check if it's null. Your error says, that it is null. Otherwise you can access code value manuelly and create a connection like this:
Hi there,
I am trying to recover user profile but after doing the call and getting the Manager (see below), when I try to get profile by getting the the provider with the manager I always get the exception:
Exception:
org.brickred.socialauth.exception.SocialAuthException: Verification code is null
What is this "Verification code"?
When Facebook redirects back to my URL it comes with this:
/home.jsf?code=AQC1B1a4QDhkfQVtzCmXarf_fR4ZKbCVczKJ1kdDdcegN8l37C8uJ7afKNKSDWbTd0kupObDVMmJznfBGGhhCntSblzdFlaphIGfBpSEpGAZhbLSbckjQ6EIuBEbaauOb2yHUyUisiCKAwpfdCYt-NBN990HpuSo0UHeeUcIy34TbT_2Yy5H6-mKgc-LD9b0idDEEfCnty6qsU71uklLPKgq7n4FvZe00_-pRY5wOz2Pr-TORdOh62HI7GbjabLvUopl46cv6S2sG4Jw-RZU26w1GC9t7LIIbNXVRfaiiBedFm_Angu_vl-9TcZWBTVen-YDWrQfHos4Mq5RTIYh5DIz#=
What should I do with this code?
Appreciate any help.
Thanks
The text was updated successfully, but these errors were encountered: