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

    Passwordless API - Can you use the APIs to log in a user?

    Scheduled Pinned Locked Moved Solved Q&A
    2 Posts 1 Posters 2.7k Views
    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.
    • mark.robustelliM
      mark.robustelli
      last edited by mark.robustelli

      Can you log the user in without any action on their part by using the passwordless API?

      mark.robustelliM 1 Reply Last reply
      Reply Quote 0
      • mark.robustelliM
        mark.robustelli @mark.robustelli
        last edited by mark.robustelli

        Yes, if you have API access. Please find the documentation here: Passwordless APIs

        The process would go like this:

        1. Call Start /api/passwordless/start, capture the code code.
        2. Call Login /api/passwordless/login with code
        3. Get a JWT and do with it what you normally would

        For a Two Factor setup you would:

        1. Call Start /api/two-factor/start consume code
        2. Call Login /api/two-factor/login with code
        3. Get a JWT

        If the end user never needs to log themselves in, you may also consider:

        1. Assign a random application password to a user.
        2. Use that known password to call the Login API
        3. Get a JWT!
        4. Optionally remove the application password if you want it to be a one time use password.

        This does have the issue of not creating an SSO session for the user, but that may not be a problem. (If someone logs in this way, and then goes to another application which has a login page managed by the 'hosted login pages' of FusionAuth, they won't be automatically logged in.)

        1 Reply Last reply
        Reply Quote 0
        • mark.robustelliM mark.robustelli has marked this topic as solved on
        • danD dan moved this topic from Q&A on
        • danD dan moved this topic from Frequently Asked Questions (FAQ) on
        • danD dan referenced this topic on

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post