-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support X-OAuth2.0 #635
Comments
Hey, sorry for the late reply. const xmpp = client({
// ...
credentials: {
domain: 'localhost',
username: 'username',
token: 'token',
}
})
xmpp.sasl.use(require('sasl-x-oauth2')) Is the correct way to add an sasl mechanism compatible with https://github.com/jaredhanson/js-sasl |
It works for me. Thanks @sonnyp However I would like to ask that is it possible to support a parameter to set preferred mech instead of using first one server response ? streamFeatures.use('mechanisms', NS, async ({stanza, entity}) => {
const offered = getMechanismNames(stanza)
const supported = SASL._mechs.map(({name}) => name)
const intersection = supported.filter(mech => {
return offered.includes(mech)
})
let mech = intersection[0]
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to use x-OAuth2.0 as the SASL mechanism but seem that it is not possible now.
What do you think if allowing developer passing mechanism into Client object(example) instead of using default SASL order matters?
The text was updated successfully, but these errors were encountered: