Add auth config pass through (#43)
This commit is contained in:
1 parent
565d5ef1c5
commit
15bcb8b1c7
3 files changed
+48
-1
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "patch",
|
||||||
|
"comment": "add auth config support",
|
||||||
|
"packageName": "@zhishuyun/hub",
|
||||||
|
"email": "cqc@germey.cn",
|
||||||
|
"dependentChangeType": "patch"
|
||||||
|
}
|
||||||
@@ -43,7 +43,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
iframeUrl() {
|
iframeUrl() {
|
||||||
return `${getBaseUrlAuth()}/auth/login?inviter_id=${this.inviterId}`;
|
return `${getBaseUrlAuth()}/auth/login?config=${JSON.stringify(this.$config.auth)}&inviter_id=${this.inviterId}`;
|
||||||
},
|
},
|
||||||
inviterId() {
|
inviterId() {
|
||||||
// if forceInviterId is set, then use forceInviterId
|
// if forceInviterId is set, then use forceInviterId
|
||||||
|
|||||||
@@ -58,5 +58,45 @@ export default {
|
|||||||
* Note: if the forceInviterId is set, there will be no distribution page in console except for the forced inviter.
|
* Note: if the forceInviterId is set, there will be no distribution page in console except for the forced inviter.
|
||||||
*/
|
*/
|
||||||
forceInviterId: undefined
|
forceInviterId: undefined
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The auth configuration.
|
||||||
|
*/
|
||||||
|
auth: {
|
||||||
|
/**
|
||||||
|
* The auth provider configuration.
|
||||||
|
*/
|
||||||
|
providers: {
|
||||||
|
/**
|
||||||
|
* The auth provider configuration for wechat.
|
||||||
|
*/
|
||||||
|
wechat: {
|
||||||
|
/**
|
||||||
|
* Enable wechat auth provider.
|
||||||
|
*/
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The auth provider configuration for email.
|
||||||
|
*/
|
||||||
|
email: {
|
||||||
|
/**
|
||||||
|
* Enable email auth provider.
|
||||||
|
*/
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The auth provider configuration for phone.
|
||||||
|
*/
|
||||||
|
phone: {
|
||||||
|
/**
|
||||||
|
* Enable phone auth provider.
|
||||||
|
*/
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user