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

Determining User Authentication Method in FusionAuth

Scheduled Pinned Locked Moved Unsolved
Q&A
webhook webhooks lambda
1
2
6.0k
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 19 Feb 2025, 22:19

    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 19 Feb 2025, 22:24 Reply Quote 0
    • W
      wesley @wesley
      last edited by 19 Feb 2025, 22:24

      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 19 Feb 2025, 22:24
      • W wesley has marked this topic as unsolved 17 days ago
      2 out of 2
      • First post
        2/2
        Last post