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
{{ message }}
Repository navigation
Representation of login/authentication type actions #4507
We're considering adding some sort of schema to represent communicating some basic authentication concepts about login flows and 2-factor authentication, and resetting passwords. This came up a bit back in issue #1149.
Login - representing that a link is used for logging in to a service/platform
Authenticate - either a) a link that is used to verify an authentication/login attempt or b) an OTP that can be used to verify an authentication/login attempt
Reset Password - representing the action to reset your password on a platform
The current thought is to use new Action subtypes. The proposal is to add LoginAction (which often includes authentication generally as a subaction), AuthenticateAction (which may or may not have to do with logging in), and ResetPasswordAction. They would all be subtypes of ControlAction.
Obviously you could get much more explicit here with the OTP object or more subtype-specific properties. I was trying to keep it lean for now and reuse instrument or target for the information on the types.
Disagree on most of your points (maybe credentials I'm ok with).
Not that I always use Wikipedia, but in this case I agree with the definition that login is the act of identifying and authenticating oneself. The identification is somewhat separate from the authentication. After I login, if I then go and initiate a risky transaction on my bank account, I'm again asked for authentication and they generally send me another OTP to authenticate the action. In this case, I'm already logged in but I'm being asked for continued authentication. The identity has already been established but authentication is being re-asserted. In an extreme case, I would argue you could login without authentication/credentials and that would still be a login, just a very insecure one.
I see Login as a meta-action which generally contains authentication as part of the overall process which generally results in you being given some token that holds your declared identity.
Fair, but I really think these actions should be defined beyond tautology, i.e explain what the outcome is.
You login and authentify some entity with some other entity and this yields a session (login) and some credentials (authentification).
Hmmm...using inheritance in leiu of aggregation? Definitely not my go-to principle, but this is schema.org and not OWL so willing to consider it.
So LoginAction is a AuthenticateAction because it almost always performs authentication and therefore it potentially has all the data necessary for authentication? The argument would be that it might save some bits if you wanted to have a login with authentication holding the password stuff?
I know it's a weak argument of sorts because it's more rare with online systems, but you could have a login without authentication - just a box that lets you select which account you wish to use. I do this at home on my PS5 for instance.
This is all super exciting and I'm glad that you all added LoginAction and AuthenticateAction!
Side note: I worked on the schema.org Action taxonomy back in 2014 when I was working in Google Search and was anticipating a "login" and "logout" action too (although, I thought it would fall under InteractAction because RegisterAction and UnregisterAction are there, rather than ControlAction), so super happy to see that you arrived at the same conclusion independently!
I'm looking for ways to represent "social login" (like, a "Sign-in with Google" or "Sign-in with Twitter" button) and I'm wondering how to go about it, so that browsers can find these buttons on the page.
Did you intend to make sure of LoginAction by a search engine or a browser?
Would that be an appropriate use of LoginAction? If so, should I subclass it into a FederatedLoginAction? Or should I add the properties that I need to LoginAction?
I'm more specifically interested in adding annotations to identity login buttons that trigger a FedCM call:
<divitemscopeitemtype="https://schema.org/LoginAction"><metaitemprop="federated"
content="client_id=\"1234\", config_url=\"https://idp.example/fedcm.json\""><!-- ... rest of the button goes here ... --></div>
As an added bonus, I think I would also appreciate being able to ask a developer to annotate their username/password form too, as well as email/sms otps too.
Something like the following for usernames/passwords:
There probably needs to be a mapping from the auto complete types to schema.org attributes.
Something that occurs to me is that the autocomplete types don't necessarily contain the "semantic" roles. For example, there is a "buyer" and a "seller", but autocomplete only has "first-name": whose first name is this? the seller's? or the buyer's?
schema.org/BuyAction, on the other hand, makes a distinction between a buyer and a seller.
The same goes for a lot of the different semantic roles, like recipient, source vs destination, etc.
It's true that not all of the possible semantics have been added to the autocomplete spec. It does have shipping/billing, home/work/mobile/..., and section-* tokens that show how this kind of thing could be added.
tokens that show how this kind of thing could be added.
It is true that we could add all of those things to the autocomplete spec.
Do you think your argument would extend also to the <form> element? Should/could we also have <form autocomplete="buy"> to represent that the buyer and seller semantic role are associated with the buy action?
Should/could we also have <form autocomplete="buy"> to represent that the buyer and seller semantic role are associated with the buy action?
I suspect not, although I've probably missed some considerations. A form is aimed at accomplishing a goal, while autocomplete is about parameters to that goal. I could imagine it being useful for <fieldset> to take an autocomplete attribute that gets added to the autocomplete values of the form controls inside it, but that's primarily an optimization, and I'd wait for authors and autocomplete maintainers to ask for it.
I don't see an existing HTML mechanism to define the purpose of a <form>, so that's a gap schema.org could plausibly fill. A difficulty here is that I don't see a way in any of RDFa, microdata, or microformats to say that a property's value is an element itself as opposed to some text or a URL in one of the element's attributes or text content. I think you need that in order for schema.org to make statements about the live form itself.
I don't see an existing HTML mechanism to define the purpose of a <form>, so that's a gap schema.org could plausibly fill. A difficulty here is that I don't see a way in any of RDFa, microdata, or microformats to say that a property's value is an element itself as opposed to some text or a URL in one of the element's attributes or text content. I think you need that in order for schema.org to make statements about the live form itself.
Actually, RDFa and JSON-LD both can. Using @samuelgoto's HTML above as a foundation for further revision, here's an RDFa variant:
That second context value would go away once the fields were defined in Schema.org (or some other vocabulary's context file). The base URL for those IDs would be whatever page the datablock was embedded within (using https://example.com/login obviously).
So, that's two solid options for describing and referencing page elements using existing plumbing. 😃 The next steps would be defining the Action (or maybe Form/Field) semantics to describe a LoginAction. I'm not at all suggesting the usernameField/passwordField are anything like correct, btw. 😅 Just a sketch. 😉
Activity
Add basic authentication action concepts #4507
MatthiasWiesmann commentedon Oct 2, 2025
Some general comments.
rrlevering commentedon Oct 3, 2025
Disagree on most of your points (maybe credentials I'm ok with).
Not that I always use Wikipedia, but in this case I agree with the definition that login is the act of identifying and authenticating oneself. The identification is somewhat separate from the authentication. After I login, if I then go and initiate a risky transaction on my bank account, I'm again asked for authentication and they generally send me another OTP to authenticate the action. In this case, I'm already logged in but I'm being asked for continued authentication. The identity has already been established but authentication is being re-asserted. In an extreme case, I would argue you could login without authentication/credentials and that would still be a login, just a very insecure one.
I see Login as a meta-action which generally contains authentication as part of the overall process which generally results in you being given some token that holds your declared identity.
MatthiasWiesmann commentedon Oct 3, 2025
Fair, but I really think these actions should be defined beyond tautology, i.e explain what the outcome is.
You login and authentify some entity with some other entity and this yields a session (login) and some credentials (authentification).
rrlevering commentedon Oct 10, 2025
Hmmm...using inheritance in leiu of aggregation? Definitely not my go-to principle, but this is schema.org and not OWL so willing to consider it.
So LoginAction is a AuthenticateAction because it almost always performs authentication and therefore it potentially has all the data necessary for authentication? The argument would be that it might save some bits if you wanted to have a login with authentication holding the password stuff?
Do you have some practical examples in mind?
rrlevering commentedon Oct 30, 2025
I know it's a weak argument of sorts because it's more rare with online systems, but you could have a login without authentication - just a box that lets you select which account you wish to use. I do this at home on my PS5 for instance.
Add basic authentication action concepts #4507 (#4517)
samuelgoto commentedon Jan 12, 2026
This is all super exciting and I'm glad that you all added
LoginActionandAuthenticateAction!I'm looking for ways to represent "social login" (like, a "Sign-in with Google" or "Sign-in with Twitter" button) and I'm wondering how to go about it, so that browsers can find these buttons on the page.
Did you intend to make sure of
LoginActionby a search engine or a browser?Would that be an appropriate use of
LoginAction? If so, should I subclass it into aFederatedLoginAction? Or should I add the properties that I need toLoginAction?I'm more specifically interested in adding annotations to identity login buttons that trigger a FedCM call:
https://w3c-fedid.github.io/FedCM/
I was thinking something along the lines of:
WDYT?
@danbri FYI
samuelgoto commentedon Jan 12, 2026
As an added bonus, I think I would also appreciate being able to ask a developer to annotate their username/password form too, as well as email/sms otps too.
Something like the following for usernames/passwords:
and like the following for otps:
WDYT?
MatthiasWiesmann commentedon Jan 13, 2026
There probably needs to be a mapping from the auto complete types to schema.org attributes.
samuelgoto commentedon Jan 13, 2026
Something that occurs to me is that the autocomplete types don't necessarily contain the "semantic" roles. For example, there is a "buyer" and a "seller", but autocomplete only has "first-name": whose first name is this? the seller's? or the buyer's?
schema.org/BuyAction, on the other hand, makes a distinction between a
buyerand aseller.The same goes for a lot of the different semantic roles, like
recipient,sourcevsdestination, etc.jyasskin commentedon Jan 13, 2026
It's true that not all of the possible semantics have been added to the autocomplete spec. It does have
shipping/billing,home/work/mobile/..., andsection-*tokens that show how this kind of thing could be added.samuelgoto commentedon Jan 13, 2026
It is true that we could add all of those things to the autocomplete spec.
Do you think your argument would extend also to the
<form>element? Should/could we also have<form autocomplete="buy">to represent that thebuyerandsellersemantic role are associated with thebuyaction?jyasskin commentedon Jan 13, 2026
I suspect not, although I've probably missed some considerations. A form is aimed at accomplishing a goal, while
autocompleteis about parameters to that goal. I could imagine it being useful for<fieldset>to take anautocompleteattribute that gets added to theautocompletevalues of the form controls inside it, but that's primarily an optimization, and I'd wait for authors and autocomplete maintainers to ask for it.I don't see an existing HTML mechanism to define the purpose of a
<form>, so that's a gap schema.org could plausibly fill. A difficulty here is that I don't see a way in any of RDFa, microdata, or microformats to say that a property's value is an element itself as opposed to some text or a URL in one of the element's attributes or text content. I think you need that in order for schema.org to make statements about the live form itself.samuelgoto commentedon Jan 13, 2026
I guess, by your argument, we'd use
autocompletefor all of the fields and only use the microdata in the<form>field, so, noitempropin any element.BigBlueHat commentedon Jan 23, 2026
Actually, RDFa and JSON-LD both can. Using @samuelgoto's HTML above as a foundation for further revision, here's an RDFa variant:
That results in the following graph (in Turtle) which would let AI's answer the "what element is the
https://schema.org/usernameField":JSON-LD can do the same from a datablock (i.e.
<script type="application/ld+json"></script>which is of course common AI/SEO annotation space anyhow):{ "@context": [ "https://schema.org/", { "usernameField": {"@type": "@id"}, // potential properties to be added to Schema.org (or other) "passwordField": {"@type": "@id"} } ], "@id": "#loginForm", "@type": "LoginAction", "usernameField": "#username", "passwordField": "#password" }which would result in the same Turtle as above:
That second context value would go away once the fields were defined in Schema.org (or some other vocabulary's context file). The base URL for those IDs would be whatever page the datablock was embedded within (using
https://example.com/loginobviously).So, that's two solid options for describing and referencing page elements using existing plumbing. 😃 The next steps would be defining the Action (or maybe Form/Field) semantics to describe a
LoginAction. I'm not at all suggesting theusernameField/passwordFieldare anything like correct, btw. 😅 Just a sketch. 😉Cheers!
🎩
github-actions commentedon May 6, 2026
This issue is being nudged due to inactivity.