That makes sense!
In this case, Auth0 does not automatically return random parameters that might be appended to the querystring. So, what you are requesting, exactly, can not be achieved. However, you can do the following (I just tested it):
1.- Append an
invite_code querystring parameter (or however you want to call it) in your transactions
2.- Create a rule that works as a conditional, where if
invite_code, then do an action. You can find more about the Context Object in Rules here: https://auth0.com/docs/rules/context-object
Now, for the action within the Rule, there are a couple things you can do:
a) You could enrich the Access or ID token
b) You could add this value in the user’s Metadata by leveraging Metadata in Rules (I personally recommend using
app_metadata for this), and this would even avoid duplication/multiple instance of the
invite_code value as you can do a check within the Rule itself by reading the
user object available to you
In either of these, your application will have to attempt to grab the value, and, if successful, use it wherever you’d like.
Let me know if this provides some more clarity.