Skip to content

Representation of login/authentication type actions #4507

Open

Description

@rrlevering

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.

Activity

  1. MatthiasWiesmann commented on Oct 2, 2025

    @MatthiasWiesmann
    Contributor

    Some general comments.

    • Authenticate should be defined as defining / validating one's identity, and probably have some identity field.
    • Login should be a subclass of Authenticate, you can't login without authentification.
    • ResetPassword should probably be called Reset Credentials.
  2. rrlevering commented on Oct 3, 2025

    @rrlevering
    ContributorAuthor

    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.

  3. MatthiasWiesmann commented on Oct 3, 2025

    @MatthiasWiesmann
    Contributor

    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).

  4. rrlevering commented on Oct 10, 2025

    @rrlevering
    ContributorAuthor

    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?

  5. rrlevering commented on Oct 30, 2025

    @rrlevering
    ContributorAuthor

    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.

  6. samuelgoto commented on Jan 12, 2026

    @samuelgoto

    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.

    Side note: I work in Google Chrome now on things like WebOTP, FedCM and Digital Credentials and email verification.

    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:

    https://w3c-fedid.github.io/FedCM/

    I was thinking something along the lines of:

    <div itemscope itemtype="https://schema.org/LoginAction">
      <meta itemprop="federated" 
        content="client_id=\"1234\", config_url=\"https://idp.example/fedcm.json\"">
      <!-- ... rest of the button goes here ... -->
    </div>

    WDYT?

    @danbri FYI

  7. samuelgoto commented on Jan 12, 2026

    @samuelgoto

    I'm looking for ways to represent "social login"

    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:

    <form itemscope itemtype="https://schema.org/LoginAction">
      <input itemprop="username" type="email">
      <input itemprop="password" type="password">
    </div>

    and like the following for otps:

    <form itemscope itemtype="https://schema.org/LoginAction">
      <input itemprop="otp" autocomplete="one-time-code">
    </div>

    WDYT?

  8. MatthiasWiesmann commented on Jan 13, 2026

    @MatthiasWiesmann
    Contributor

    There probably needs to be a mapping from the auto complete types to schema.org attributes.

  9. samuelgoto commented on Jan 13, 2026

    @samuelgoto

    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.

  10. jyasskin commented on Jan 13, 2026

    @jyasskin

    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.

  11. samuelgoto commented on Jan 13, 2026

    @samuelgoto

    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?

  12. jyasskin commented on Jan 13, 2026

    @jyasskin

    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.

  13. samuelgoto commented on Jan 13, 2026

    @samuelgoto

    I think you need that in order for schema.org to make statements about the live form itself.

    I guess, by your argument, we'd use autocomplete for all of the fields and only use the microdata in the <form> field, so, no itemprop in any element.

  14. BigBlueHat commented on Jan 23, 2026

    @BigBlueHat
    Contributor

    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:

    <form id="loginForm" vocab="https://schema.org/" typeof="LoginAction" about="#loginForm">
      <input id="username" property="usernameField" resource="#username" type="email" value="me@example.com">
      <input id="password" property="passwordField" resource="#password" type="password">
    </form>

    That results in the following graph (in Turtle) which would let AI's answer the "what element is the https://schema.org/usernameField":

    <https://example.com/login#loginForm>
       rdf:type <https://schema.org/LoginAction>;
       <https://schema.org/usernameField> <https://example.com/login#username>;
       <https://schema.org/passwordField> <https://example.com/login#password> .

    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:

    <https://example.com/login#loginForm>
       rdf:type <https://schema.org/LoginAction>;
       <https://schema.org/usernameField> <https://example.com/login#username>;
       <https://schema.org/passwordField> <https://example.com/login#password> ..

    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. 😉

    Cheers!
    🎩

  15. github-actions commented on May 6, 2026

    @github-actions

    This issue is being nudged due to inactivity.

  16. added
    no-issue-activityDiscuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).
    on May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-issue-activityDiscuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions