#11: Provide socials in the register
This commit is contained in:
parent
a501af669c
commit
9276b08f4b
@ -185,5 +185,59 @@
|
||||
return out;
|
||||
|
||||
})(),
|
||||
"social": {
|
||||
"displayInfo": (function (){
|
||||
<#attempt>
|
||||
return ${social.displayInfo?c};
|
||||
<#recover>
|
||||
</#attempt>
|
||||
})(),
|
||||
"providers": (()=>{
|
||||
|
||||
<#attempt>
|
||||
<#if social.providers??>
|
||||
|
||||
var out= [];
|
||||
|
||||
<#attempt>
|
||||
<#list social.providers as p>
|
||||
out.push({
|
||||
"loginUrl": (function (){
|
||||
<#attempt>
|
||||
return "${p.loginUrl?no_esc}";
|
||||
<#recover>
|
||||
</#attempt>
|
||||
})(),
|
||||
"alias": (function (){
|
||||
<#attempt>
|
||||
return "${p.alias}";
|
||||
<#recover>
|
||||
</#attempt>
|
||||
})(),
|
||||
"providerId": (function (){
|
||||
<#attempt>
|
||||
return "${p.providerId}";
|
||||
<#recover>
|
||||
</#attempt>
|
||||
})(),
|
||||
"displayName": (function (){
|
||||
<#attempt>
|
||||
return "${p.displayName}";
|
||||
<#recover>
|
||||
</#attempt>
|
||||
})()
|
||||
});
|
||||
</#list>
|
||||
<#recover>
|
||||
</#attempt>
|
||||
|
||||
return out;
|
||||
|
||||
</#if>
|
||||
<#recover>
|
||||
</#attempt>
|
||||
|
||||
})()
|
||||
}
|
||||
}
|
||||
</script>
|
@ -130,6 +130,15 @@ export declare namespace KcContext {
|
||||
* (https://github.com/micedre/keycloak-mail-whitelisting)
|
||||
*/
|
||||
authorizedMailDomains?: string[];
|
||||
social: {
|
||||
displayInfo: boolean;
|
||||
providers?: {
|
||||
loginUrl: string;
|
||||
alias: string;
|
||||
providerId: string;
|
||||
displayName: string;
|
||||
}[]
|
||||
};
|
||||
};
|
||||
|
||||
export type Info = Common & {
|
||||
|
@ -168,7 +168,10 @@ export const kcRegisterContext: KcContext.Register = {
|
||||
"*.yet-another-example.com",
|
||||
"*.example.com",
|
||||
"hello-world.com"
|
||||
]
|
||||
],
|
||||
"social": {
|
||||
"displayInfo": true
|
||||
},
|
||||
};
|
||||
|
||||
export const kcInfoContext: KcContext.Info = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user