Store addtional parameters in database on SignUp

Hi There!

I’m very new to auth0 so please be a little patient to me.

I am using laravel 8.9 and the auth0-laravel sdk.
So it’s quite nice and working well.

Now my challenge is:
When a user register/signup, i want to pass an addtional paramater to the /authorize connection.
Here it is called “host”

 $authorize_params = [
        'scope' => 'openid profile email',
        // Use the key below to get an access token for your API.
        // 'audience' => config('laravel-auth0.api_identifier'),
        // action: 'signup' or 'login' for classuc
        'screen_hint' => 'signup',
        'prompt' => 'login',
        'host' => 'hereissomemoreinformation',
    return App::make('auth0')->login(null, null, $authorize_params);

When the user signs up, and the parameter is set, i want to store the content of this parameter in the database in user_metadata[host] (for example)

i see in the network traffic that this paremter is scucessfull transfered to the /authorization endpoint


The parameter will only be provided during signup

i have no plan how this can be archieved?

it will be great if you can help me

Hi @Markus117,

Welcome to the Community!

If I understand your setup correctly, that param should be available in a rule via context.request.query.

You can setup the rule to run on first login by looking at logins_count or by checking if the user_metadata property exists if every user will have it.

From there you can update the user_metadata directly in that rule.

Thanks so much, that works like a charme !

1 Like

Glad to hear it. Let us know if you have other questions.

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