FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Determining User Authentication Method in FusionAuth

    Scheduled Pinned Locked Moved Solved
    Q&A
    webhook webhooks lambda
    1
    2
    999
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wesley
      last edited by

      In our application, we want to determine how a user authenticated—whether via Google login, username/password, IDP, etc.

      Questions:

      1. Is this information already included in the JWT?
      2. If not, is there a way to receive this data when a user logs in?
      W 1 Reply Last reply Reply Quote 0
      • W
        wesley @wesley
        last edited by

        Yes, FusionAuth provides this information via the authenticationType claim in the JWT. This claim indicates the authentication method used, such as PASSWORD, GOOGLE, SAML, etc.

        How to Access Authentication Type:

        1. From the JWT:
          • The authenticationType claim is included in the JWT access token.
          • Documentation: JWT Access Token Claims
        2. From a Webhook Event (Alternative Approach):
          • The same authenticationType value is included in the user.login.success webhook event.
          • This may be useful if your system processes authentication events via webhooks instead of decoding JWTs.
          • Documentation: User Login Success Webhook

        For additional details on JWT structure and claims, refer to: JWT Components Explained

        1 Reply Last reply Reply Quote 0
        • W wesley has marked this topic as solved on
        • First post
          Last post