powered by Jive Software

'Authentication failed' message but credentials are valid

I set up an Openfire server (v4.6.6) and created a test user. I can login as the test user with both Spark (on Windows 10) and Xabber (on Android).

I’m trying to connect to the server with the Artalk.Xmpp:

using Artalk.Xmpp.Client;

var xmpp = new ArtalkXmppClient("143.#.#.133", "test@xmpp", "123", 5222, false);

try
{
    xmpp.Connect();
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

I get "SaslException: SASL authentication failed." error message but as I said the credentials are valid and I can connect with other clients. What is the problem here? Should I set any settings in the server side?

Note 1: I don’t have a domain so I have to use the IP of the server.

Note 2: I tried with another library (Sharp.Xmpp) and got the same error.

If you can connect using other clients, then this is very likely an issue with how you use the library, not in Openfire.

Every XMPP server has a domain, even if you do not configure a public “nice” one. It is important to define that correctly when setting things up. Look at the first page of the admin console of Openfire: it will show you what the domain name is that was used to configure Openfire. You need to use this domain value when connecting with a client.

please also take care on: Failed SASL authentification: unknown challenge - #3 by akrherz

Yes, try disabling DIGEST_MD5 on the openfire server side and see if your troubles go away.