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

    Can you have an anonymous user in FusionAuth?

    Scheduled Pinned Locked Moved Solved Q&A
    2 Posts 1 Posters 1.2k 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.
    • danD
      dan
      last edited by

      I want users to be able to do things on my app (like add items to a cart) anonymously. Then, when they sign in or register, I want to transfer that cart over to their account.

      Is that possible with FusionAuth?

      --
      FusionAuth - Identity Without Constraints
      https://fusionauth.io

      danD 1 Reply Last reply
      Reply Quote 0
      • danD
        dan @dan
        last edited by

        Yes, you can do this.

        There are a couple of different approaches, they both require a bit of glue code.

        You could create a user in FusionAuth with a name like anon-<uuid>@example.com and a known random password. Then create a JWT for that account using the login API. Add info to that account, then if/when the user registers, transfer that account info to the new user. You could even update the email address of the anon-<uuid>@example.com account and reset their password. This would be accomplished via the user API.

        An alternative approach is to use the Vend JWT API to create a JWT for your anonymous user. This can look like anything, it's entirely freeform. When the user registers, you can take the info referenced by that JWT and transfer it to the new user.

        If these don't meet your needs, feel free to open a GitHub issue with a specific use case.

        --
        FusionAuth - Identity Without Constraints
        https://fusionauth.io

        1 Reply Last reply
        Reply Quote 0
        • danD dan 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

        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