YAFLogo

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Another question: When user registers with FB, Twitter or Google - how does the system know which username, display name and password to set for that person? This would be helpful to know especially if they try to manually login (only with username and password) in the future.

Tip: Jquery 1.10.2 has been released.

And also thanks for adding Google plus SSO. This may be the only forum giving that option to users. :)

Originally Posted by: johnk 

They get an email with the username (the user name is the username from FB,Twitter or google) + password (is autom. generated) also the security question an answer.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago

Please try the updated code.

Originally Posted by: tha_watcha 

Installed latest code and the error in eventlog is I think the same.

Error while trying to login or register the facebook user System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type YAF.Types.Objects.FacebookUser. End element 'hometown' from namespace '' expected. Found element 'id' from namespace ''. ---> System.Xml.XmlException: End element 'hometown' from namespace '' expected. Found element 'id' from namespace ''. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3) at System.Xml.XmlExceptionHelper.ThrowEndElementExpected(XmlDictionaryReader reader, String localName, String ns) at System.Xml.XmlBaseReader.ReadEndElement() at System.Xml.XmlBaseReader.ReadElementContentAsString() at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsString() at ReadFacebookUserFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) --- End of inner exception stack trace --- at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream) at YAF.Utils.Extensions.JsonExtension.Deserialise[T](String json) at YAF.Core.Services.Auth.Facebook.GetFacebookUser(HttpRequest request, String access_token) at YAF.Core.Services.Auth.Facebook.LoginOrCreateUser(HttpRequest request, String parameters, String& message) at YAF.Auth.HandleFacebookReturn()

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago
Sorry it can not work the hometown is a sub list. i disabled the hometown property it should work now.
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago
Sweet! All three work as expected now regarding registration.

Connect to an Existing ForumId

Facebook - didn't actually log me in. I say it worked because my FB profile info was put into my forum profile.

Google link to Forum Id returned the error below so I think I have something wrong. But Google works to create new registeration.

Error: invalid_request

http://packershome.com/forum/auth.aspx?auth=google&error=access_denied 

Twitter - works as expected

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Google link to Forum Id returned the error below so I think I have something wrong. But Google works to create new registeration.

Error: invalid_request

http://packershome.com/forum/auth.aspx?auth=google&error=access_denied 

Originally Posted by: Zero2Cool 

I didn't get that error on your site. I was able to register and to login.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago

Google link to Forum Id returned the error below so I think I have something wrong. But Google works to create new registeration.

Error: invalid_request

http://packershome.com/forum/auth.aspx?auth=google&error=access_denied 

Originally Posted by: tha_watcha 

I didn't get that error on your site. I was able to register and to login.

Originally Posted by: Zero2Cool 

Registering for a NEW ForumId works with all three social mediums.

Connecting to an existing ForumId with the social mediums is where the Google+ error comes up as well as the Facebook issue.

Connecting to an existing ForumId with Twitter works fine.

I deleted your ForumId newly created if you wanted to test it against the first account you made.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Google link to Forum Id returned the error below so I think I have something wrong. But Google works to create new registeration.

Error: invalid_request

http://packershome.com/forum/auth.aspx?auth=google&error=access_denied 

Originally Posted by: Zero2Cool 

I didn't get that error on your site. I was able to register and to login.

Originally Posted by: tha_watcha 

Registering for a NEW ForumId works with all three social mediums.

Connecting to an existing ForumId with the social mediums is where the Google+ error comes up as well as the Facebook issue.

Connecting to an existing ForumId with Twitter works fine.

I deleted your ForumId newly created if you wanted to test it against the first account you made.

Originally Posted by: Zero2Cool 

You mean userid right ?!

i updated the code on github. connecting to google and facebook should now work. To fix the error above with google you need to add the second url as redirect url in the google api console

Redirect URIs:

http://packershome.com/forum/auth.aspx?auth=google&connectCurrent=true 

http://packershome.com/forum/auth.aspx?auth=google 

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago

You mean userid right ?!

i updated the code on github. connecting to google and facebook should now work. To fix the error above with google you need to add the second url as redirect url in the google api console

Redirect URIs:

http://packershome.com/forum/auth.aspx?auth=google&connectCurrent=true 

http://packershome.com/forum/auth.aspx?auth=google 

Originally Posted by: tha_watcha 

Yes, UserId, but the YAF language calls it a Forum Id in spots so that's what I was referring to.

Thanks for the redirect. I'll update that throw some feedback here.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Yes, UserId, but the YAF language calls it a Forum Id in spots so that's what I was referring to.

Originally Posted by: Zero2Cool 

Really ? i can not find it in the language files. Do you know where you saw it? if yes it needs to be fixed.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago

Really ? i can not find it in the language files. Do you know where you saw it? if yes it needs to be fixed.

Originally Posted by: tha_watcha 

Apparently I'm a liar cuz now I can't find it. But I swear it said it somewhere because that's why I started referencing as to be on the same page and for clarity.

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time
10 years ago
Tha_watcha: Could you please update documentation on codeplex and on github on how to enable Google SSO? You could add a note that it is only for version 2.0 RC1 and above.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Tha_watcha: Could you please update documentation on codeplex and on github on how to enable Google SSO? You could add a note that it is only for version 2.0 RC1 and above.

Originally Posted by: johnk 

Updated Wiki is online

https://github.com/YAFNET/YAFNET/wiki/Google-Integration 

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time
10 years ago
Thanks tha_watcha.

I noticed a typo in the sentence:

The Client ID/secre needs to be entered in the app.config in your Forum

BTW, if the forum is inside a subfolder, what would the redirect URL look like?

http://yourdomain.com/yaf/auth.aspx?auth=google&connectCurrent=true
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time
10 years ago
Another question on redirect link above:

Is /yaf/ the subfolder where forum is located or is it based on urlrewriter rule?

I have turned off urlrewriter. So would that redirect link still work?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Another question on redirect link above:

Is /yaf/ the subfolder where forum is located or is it based on urlrewriter rule?

I have turned off urlrewriter. So would that redirect link still work?

Originally Posted by: johnk 

Yes the yaf in the url was the sub folder, i changed the text.

And yes it also works without the urlrewriter