Send custom params on login with user and password

Hey @osvald01,

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 context.request.query contains invite_code, then do an action. You can find more about the Context Object in Rules here: Context Object Properties in Rules

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.