# Anonymous User Flow

**URL:** <https://community.auth0.com/t/anonymous-user-flow/73792>\
**Category:** Get Help\
**Tags:** claims, jwt\
**Created:** [November 26, 2021, 2:53am UTC](https://community.auth0.com/t/anonymous-user-flow/73792 "2021-11-26T02:53:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TylerStillwater](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tylerstillwater/32/33270_2.png) [@TylerStillwater](https://community.auth0.com/u/TylerStillwater)\
**Post date:** [November 26, 2021, 2:53am UTC](https://community.auth0.com/t/anonymous-user-flow/73792/1 "2021-11-26T02:53:18Z")

</div>

Greetings!

I am currently evaluating Auth0 for our company, and I have hit a wall that may cause us to be unable to move forward with Auth0. I am hoping that is not the case, hence the post.

Essentially, we have need of some form of anonymous user. We are reducing friction and creating investment by allowing a user to go through a good portion of our flow before asking them to authenticate in any form.

As such, we need a way to identify that user/session and link it to the Auth0 user once they authenticate. Due to the way our auth layer works, we _must_ have a JWT to handle authentication and authorization, even for an anonymous user.

Effectively, what this means is that I need to be able to manually generate a custom JWT with specific claims/roles/userID/etc that the client can use to authenticate until they log in through Auth0 and receive a “real” JWT.

Alternatively, if I could generate some kind of JWT with a unique ID inside it, then provide that to the client, that would also work, I believe. Custom claims aren’t strictly necessary.

Thus far I’ve not been able to find any way to do this with Auth0. Is this possible?

Thanks!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 26, 2021, 7:29pm UTC](https://community.auth0.com/t/anonymous-user-flow/73792/3 "2021-11-26T19:29:39Z")

</div>

Hi @TylerStillwater,

Welcome to the Auth0 Community!

This _may_ be possible, but there isn’t a turn-key feature we offer to facilitate creating anonymous JWTs.

Using an Auth0 DB connection, you would need to provide some placeholder email, which you would later change to the user’s actual email. That’s the best way I can think of with the rigid constraints you’ve outlined here.

---

<div class="post-metadata">

**Author:** ![TylerStillwater](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tylerstillwater/32/33270_2.png) [@TylerStillwater](https://community.auth0.com/u/TylerStillwater)\
**Post date:** [November 26, 2021, 7:42pm UTC](https://community.auth0.com/t/anonymous-user-flow/73792/4 "2021-11-26T19:42:45Z")

</div>

Hey @dan.woda!

Thanks very much for the response!

I am very new (literally 1 day) to Auth0. Can you please point me to the appropriate docs to accomplish what you suggest?

A placeholder email should work _great_, assuming I can create a JWT with that email directly. Each incoming anonymous user would need their own.

Thanks again!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 26, 2021, 9:25pm UTC](https://community.auth0.com/t/anonymous-user-flow/73792/5 "2021-11-26T21:25:29Z")

</div>

You can create users using the [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/post_users) create users endpoint. You would need to figure out a strategy for updating the user’s email when they finally sign up. It is also important to consider the possible security implications of this type of flow.

This isn’t a a flow that Auth0 supports natively, and is going to require quite of bit of development/workaround on your end.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 11, 2021, 9:25pm UTC](https://community.auth0.com/t/anonymous-user-flow/73792/6 "2021-12-11T21:25:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
