0
使用auth0,我下面這個教程有關連接多租戶SaaS的天青AD: https://auth0.com/docs/tutorials/building-multi-tenant-saas-applications-with-azure-active-directoryAuth0連接到Azure的廣告沒有回我的狀態PARAMS
但是,因爲我的情況有點不同,我需要它在用戶登錄時傳遞一些參數。對於其他連接,我可以設置options.authParams.state =「...」,並將此狀態發送到我的callbackURL。
但是,使用Azure AD連接,我的狀態變量不正確。當我收到回調時它是空的。
我包括根據教程新Azure的AD鍵:
lock.once('signup ready', function() {
var link = $('<div class="a0-zocial a0-icon a0-waad" href="#">'
+ '<span>Azure AD</span></div>');
link.on('click', function() {
lock.getClient().login({
connection: 'seedtec-onmicrosoft-com'
});
});
var iconList = $(this.$container).find('.a0-iconlist');
iconList.append(link);
});
並通過選項送我的狀態:
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);
你知道什麼是錯的呢?
謝謝! PS:我爲auth0使用角度庫。