Auth0 connecting to Azure AD is not returning my state params
<p>Using auth0, I'm following this tutorial about connecting a multi-tenant saas to Azure AD:
<a href="https://auth0.com/docs/tutorials/building-multi-tenant-saas-applications-with-azure-active-directory" rel="nofollow">https://auth0.com/docs/tutorials/building-multi-tenant-saas-applications-with-azure-active-directory</a></p>

<p>But, since my case is a bit different, I need it to pass some parameters when the user logs in. For the other connections, I'm able to set options.authParams.state = "..." and this state is sent to my callbackURL.</p>

<p>But, using Azure AD connection, my state variable is not correct. It's empty when I receive the callback.</p>

<p>I'm including the new Azure AD button according to the tutorial:</p>

<pre><code>lock.once('signup ready', function () {
                    var link = $('&lt;div class="a0-zocial a0-icon a0-waad" href="#"&gt;'
                        + '&lt;span&gt;Azure AD&lt;/span&gt;&lt;/div&gt;');
                    link.on('click', function () {
                        lock.getClient().login({ 
                            connection: 'seedtec-onmicrosoft-com'
                        });
                    });

                    var iconList = $(this.$container).find('.a0-iconlist');
                    iconList.append(link);
                });
</code></pre>

<p>And sending my state through options:</p>

<pre><code>var options = {
                    container: 'root'
                  , callbackURL: 'http://.../LoginCallback.ashx'
                  , responseType: 'code'
                  , dict: 'pt'
                  , socialBigButtons: false
                  , authParams: {
                      state: state
                      , scope: 'openid profile'
                      , company_id: $scope.companyId
                  }
                  , mode: mode
                  , callbackOnLocationHash: true
                };



lock.show(options);
</code></pre>

<p>Do you know what is wrong in that?</p>

<p>Thank you!</p>

<p>PS: I'm using angular libraries for auth0.</p>