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

How to determine if an user has a password?

Scheduled Pinned Locked Moved
Q&A
3
3
1.6k
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.
  • M
    mgetka Power User
    last edited by 2 Jul 2020, 13:51

    I want to provide an user with a different password change/set form, depending on whether the user has the password or not. Users without a password are those who have so far authenticated only via external IDPs. I cannot find any API that provides such information. I thought that maybe, since the user has no password, the user.passwordLastUpdateInstant attribute will be empty, but it has the same value as user.insert 😞

    1 Reply Last reply Reply Quote 1
    • D
      dan
      last edited by dan 7 Feb 2020, 21:02 2 Jul 2020, 16:29

      Hiya,

      You're correct, I don't think this information is available. That's because a single user can have multiple different ways of signing in.

      One possible solution would be to listen for a webhook on successful login and store off the authentication_type (as documented) value for each user/application combination (because a user might use Google for app A, Facebook for app B and email/pass for app C). Then you could look it up when displaying the password change/set form.

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      K 1 Reply Last reply 30 Nov 2023, 09:18 Reply Quote 1
      • K
        kim @dan
        last edited by 30 Nov 2023, 09:18

        @dan Hello, reaching out to know if this still the same, ie no way to know whether an user has a password or not?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post