-
bodqhrohro
> 2025-04-11T20:58:31Z - theTedd: > When the aim is to log in on mobile, you'll already be using data to request the code, and then presumably chatting afterwards The SIM is not necessarily installed in the same device. ↺
-
bodqhrohro
> 2025-04-11T18:36:25Z - Zash: > but '77 doesn't really support flows like "enter an email, then enter the code we sent to that email", but https://xmpp.org/extensions/xep-0389.html was meant to allow that kind of thing Wow, I'm implementing a login wizard via Ad-Hoc right now, because XEP-0077 does not support multiple stages. Is it implemented in some clients already? ↺
-
bodqhrohro
I'm not sure though if it's suitable for the case, probably still not.
-
singpolyma
I don't think it's implemented anywhere no
-
badrihippo
I'm hoping to implement it for a few clients though, once I figure out the details and get a funding green light from Prav
-
badrihippo
bodqhrohro, tell me more about your use-case?
-
badrihippo
So I've been thinking about FAST and it looks like combined with extensible IBR we have all we need for actual passwordless authentication?
-
badrihippo
If I understood the specs right, I can use extensible IBR the first time to receive a one-time login code to (email or mobile) and register the user if it matches
-
badrihippo
Then each time the user wants to log in from a new client we use FAST to trigger another one-time code, after which the client gets a token for future reconnections
-
badrihippo
One flaw is the client would get *two* codes the first time (once for registration, and once for login)
-
badrihippo
Unless there's something in the reg spec that lets the server say "okay cool you're registered and also authenticated so you can continue using the existing connection"? But that would *also* have to say "...and here's your FAST token" so things get a bit complicated 🤔
-
badrihippo
https://xmpp.org/extensions/xep-0389.html#example-15
-
badrihippo
After successful registration (at the point linked to above) is the negotiation considered complete (as if they've also authenticated) or does the client has to renegotiate (i.e. authenticate again)?
-
badrihippo
Equivalent question for whatever the `jabber:iq:register` RFC is
-
badrihippo
> well: > > You're welcome to implement it. or write a XEP Just learnt about this utilisation of XEP-0070 that actually implements "Sign into website with XMPP"! https://blog.agayon.be/xmpp_auth_django.html ↺
-
bodqhrohro
> <badrihippo> > bodqhrohro, tell me more about your use-case? Multi-stage login via a transports. It already works via text commands, and via separate Ad-Hoc commands, I'm just duplicating it as a wizard also.✎ ↺ -
bodqhrohro
> <badrihippo> > bodqhrohro, tell me more about your use-case? Multi-stage login via a transport. It already works via text commands, and via separate Ad-Hoc commands, I'm just duplicating it as a wizard also. ✏ ↺
-
badrihippo
Interesting. Did that work out of the box in clients or did you have to customise on that end too?✎ -
badrihippo
Interesting. Did that work out of the box in clients or did you have to customise on the client end too? ✏
-
bodqhrohro
badrihippo: Ad-Hoc works well in many clients for decades already. There are indeed some tiny problems, e.g., Gajim didn't support multiple notes per a command result (I've sent a patch for that), and Psi+/Tkabber don't as well (still didn't even report). And there some bugs in forms in another.im and probably in Cheogram too.
-
singpolyma
bodqhrohro: multiple notes it should show only one of them per spec
-
singpolyma
But yes IMO every user facing flow should be built on ad hoc unless there's a very good reason not to
-
Zash
Is "you don't have an account yet" a good reason?
-
singpolyma
No?
-
Zash
I guess you can do it by first granting a limited account and then upgrading later.
-
singpolyma
You don't need an account. Same as ibr
-
singpolyma
If you're just talking to the server
-
Zash
So more iq stanzas before resource binding? That's not supposed to be allowed and only exists for historical reasons
-
singpolyma
Well we're talking about account registration. It's the same case where we do this already
-
Zash
For ugly historical reasons
-
Zash
Let's not add more of it
-
bodqhrohro
> 2025-04-12T13:08:47Z - singpolyma: > bodqhrohro: multiple notes it should show only one of them per spec Ehm, really? ↺
-
singpolyma
Zash: Im not proposing adding more. Just keeping the one we have and using a different syntax
-
Zash
But I want it gone :(
-
singpolyma
bodqhrohro: yes. A command may have multiple payloads but they are alternatives to each other
-
singpolyma
Zash: how would you do registration then?
-
Zash
IBR2?
-
singpolyma
Which somehow doesn't need to communicate before having an account?
-
Zash
Wait what the, who put an iq there?
-
singpolyma
I can't imagine any way torke an IBR replacement without iq
-
badrihippo
> You don't need an account. Same as ibr I didn't know that! ↺
-
Zash
Prosody doesn't even treat those as iq stanzas, because stanzas aren't allowed before resource binding (and authenticating)
-
badrihippo
> For ugly historical reasons What's the history? ↺
-
Zash
badrihippo, in 1999, iq stanzas was used for everything
👀 1 -
singpolyma
Zash: Oh so you just want to replace with IQ equivalent nonzas?
-
Zash
singpolyma, yes
-
Zash
like auth and everything else going on before resource binding
-
singpolyma
That seems worse. Nonzas are gross. But I guess it's equivalent
-
singpolyma
Why not a nonza named iq 😉
-
Zash
Noooooo!
-
Zash
We already have too many of those
-
singpolyma
Making up new names seem like where the "more of those" come from but fine. If we pick the other name and keep the payloads the same I can still use the ad hoc code path so I don't really care
-
singpolyma
Or I guess use the <command element as a nonza directly why not
-
Zash
Pre-bind <iq> requires more involved routing that the simple name+namespace dispatch used for other stream elements
-
Zash
also stanzas are supposed to be routable, which isn't allowed pre-auth/bind
-
badrihippo
I'm new to this part of the stream, but isn't the entire negotiation a sequence of request/responses anyway? So "iq" is kind of anyway implied for everything and there's no need to make it explicit just for one case?
-
singpolyma
Yes obviously an IQ with a to attribute would not be allowed pre bind
-
singpolyma
badrihippo: sure
- badrihippo realises that could also be an argument to add *more* iq to everything
-
singpolyma
Yes
-
singpolyma
Its the same either way. Using iq is slightly simpler but it doesn't really matter I guess
-
singpolyma
So long as we use <command
-
badrihippo
Looking at Zash's comments I think I need to read the code before forming a ~judgement~ opinion
-
badrihippo
To understand the technical part
-
singpolyma
An IQ can only have one payload so as long as you won't have multiple in flight at once using the payload directly is equivalent to using an iq
👍🏽 1 -
bodqhrohro
> 2025-04-12T13:16:27Z - Zash: > But I want it gone :( Could you point me to an exact excerpt? I can't find anything like that, yet I see multiple explicit mentions that there can be multiple <note> elements. If payloads are supposed to be alternatives, then how are actions are supposed to be provided along with forms? I assume the same applies to notes: they are supposed to accompany other elements, not to replace them. Or does this apply only to elements of the same type? Also, it seems that spec-wise the whole set of children elements of the <command> element is considered a "payload", not individual elements or one of them.✎ ↺ -
bodqhrohro
> 2025-04-12T13:16:27Z - Zash: > But I want it gone :( Could you point me to an exact excerpt? I can't find anything like that, yet I see multiple explicit mentions that there can be multiple <note> elements. If payloads are supposed to be alternatives, then how are actions supposed to be provided along with forms? I assume the same applies to notes: they are supposed to accompany other elements, not to replace them. Or does this apply only to elements of the same type? Also, it seems that spec-wise the whole set of children elements of the <command> element is considered a "payload", not individual elements or one of them. ✏ ↺
-
Zash
Huh?
-
singpolyma
Actions aren't a payload in the same way
-
bodqhrohro
> 2025-04-12T13:32:13Z - Zash: > Huh? Sorry, popup buttons in Gajim work unclearly for narrow rows and I miss the proper message sometimes. ↺
-
bodqhrohro
Eww, they just got out of sync when scrolling.
-
Zash
https://cerdale.zash.se/s/067fa6bb-a04c-7ee4-8ceb-4a7120b4fc3f/345b2074-b9ef-4b70-98d5-cfa7d1641a9a.png
-
singpolyma
> When the precedence of these payload elements becomes important (such as when both "jabber:x:data" and "jabber:x:oob" elements are present), the order of the elements SHOULD be used. Those elements that come earlier in the child list take precedence over those later in the child list.
-
singpolyma
> The children of a <command/> element (other than <actions/> and <note/>) pertain to the command's execution. The order of these elements denote their precedence, so that those elements earlier in the list have higher precedence.
-
bodqhrohro
> 2025-04-12T13:33:47Z - singpolyma: > > When the precedence of these payload elements becomes important (such as when both "jabber:x:data" and "jabber:x:oob" elements are present), the order of the elements SHOULD be used. Those elements that come earlier in the child list take precedence over those later in the child list. I saw this, but what does "precedence" mean exactly? "Pick one" or "take order into account"? ↺
-
bodqhrohro
> 2025-04-12T13:35:44Z - singpolyma: > > The children of a <command/> element (other than <actions/> and <note/>) pertain to the command's execution. The order of these elements denote their precedence, so that those elements earlier in the list have higher precedence. And this also means <note> is special along with <actions>. ↺
-
singpolyma
Yes the second one says note is special which makes no sense and isn't now anyone implements it
-
singpolyma
Precedence means "which one you choose"
-
singpolyma
Eg I often deliver a note or form and oob with oob first so it is used when supported and when not supported the note or form is used
-
singpolyma
Based on how implementations work and how the rest of the spec reads I expect the (excepts actions or note) should just say (except actions)
-
Zash
https://xmpp.org/rfcs/rfc6120.html#rfc.section.4.3.5 has some words the effect of forbidding stanzas prior to completing stream negotiation and points out resource binding as an *historical* exception to that rule. Seems much cleaner to me to keep handling of stream negotiation (and e.g. xep-198 acks) separate from stanza routing.
-
bodqhrohro
> 2025-04-12T13:37:15Z - singpolyma: > Yes the second one says note is special which makes no sense and isn't now anyone implements it It makes sense because there are multiple types of notes which have different purpose. ↺
-
bodqhrohro
> 2025-04-12T13:39:56Z - singpolyma: > Based on how implementations work and how the rest of the spec reads I expect the (excepts actions or note) should just say (except actions) I think implementations are just not well-polished enough because Ad-Hoc had little real use historically and wasn't battle-tested enough. AFAIR, there were even plans to remove it from Gajim because the code is rotten and abandoned, but someone insisted to keep it. ↺
-
lovetox
i think you remember something wrong there
-
bodqhrohro
Maybe, I have no proofs there :P
-
lovetox
the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc
-
lovetox
e.g. my text is not dispalyed pretty in this dataform
-
bodqhrohro
> 2025-04-12T13:51:19Z - lovetox: > the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc Yup, aforementioned another.im bugs also happen with dataforms rather than in the scope of Ad-Hoc itself. (do forms have use out of Ad-Hoc though?) ↺
-
singpolyma
>> 2025-04-12T13:37:15Z - singpolyma: >> Yes the second one says note is special which makes no sense and isn't now anyone implements it > It makes sense because there are multiple types of notes which have different purpose. Do you have an example of including two types of notes in one response? ↺
-
singpolyma
>> 2025-04-12T13:51:19Z - lovetox: >> the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc > Yup, aforementioned another.im bugs also happen with dataforms rather than in the scope of Ad-Hoc itself. > (do forms have use out of Ad-Hoc though?) Yes they do. In IBR for example. And MUC config ↺
-
bodqhrohro
> 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about update properties, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)✎ ↺ -
bodqhrohro
> 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated properties, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.) ✏ ↺
-
bodqhrohro
> 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.) ✏ ↺
-
bodqhrohro
> 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected optoins. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.) ✏ ↺
-
bodqhrohro
> 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected options. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.) ✏ ↺
-
singpolyma
So you have an error but you also include a seperate info note? 🤔
-
bodqhrohro
Actually, this is a legacy of mapping the CLI way to the form, where one command could change only one option at a time. I might consider reworking it, i.e., ping back the corrected form to the user to check and confirm it, and also to reject it altogether if there are problems with certain fields. Yet I think listing the changed options is easier than to spot what was changed in the form. As there are no rich means for interactive validation.
-
bodqhrohro
> 2025-04-12T14:14:42Z - singpolyma: > So you have an error but you also include a seperate info note? 🤔 Yup. "ERROR: Success", lol. ↺
-
singpolyma
The wording there sort of implies you can have a note *and* a form too which seems odd since a firm can already display whatever. I've always done precedence with notes alongside everything
-
bodqhrohro
singpolyma: this time I'm talking about the completion stage. But a note and a form is an even more valid case regarding validation. How to display the reason the form was rejected otherwise? Show a message and provided a "prev" action to go to the previous stage and correct it? Doesn't seem flexible really.✎ -
bodqhrohro
singpolyma: this time I'm talking about the completion stage. But a note and a form is an even more valid case regarding validation. How to display the reason the form was rejected otherwise? Show a message and provide a "prev" action to go to the previous stage and correct it? Doesn't seem flexible really. ✏
-
bodqhrohro
I also remember trying to add some instructions on filling the form, yet I probably rejected this idea exactly because there's no robust way to do that with current clients.
-
singpolyma
A form can show text already with instructions elements etc. Don't need a note for that
-
lovetox
but is it the right thing to do
-
lovetox
its not about sending just text, its about telling the client that an error or warning happend
-
lovetox
just writing it into the instruction text gives the client no chance to properly display whats happened
-
bodqhrohro
> 2025-04-12T15:00:12Z - singpolyma: > A form can show text already with instructions elements etc. Don't need a note for that Hmm, yeah, then it happened in the semi-functional XEP-0077 stub. ↺
-
singpolyma
> just writing it into the instruction text gives the client no chance to properly display whats happened I have wished for a per field error option in data forms before. ↺