Compare commits

...

9 Commits

Author SHA1 Message Date
f5556a02fc Update changelog v1.1.5 2021-06-15 15:38:25 +00:00
1050f4d928 Bump version (changelog ignore) 2021-06-15 17:32:26 +02:00
9276b08f4b #11: Provide socials in the register 2021-06-15 17:32:03 +02:00
a501af669c Update changelog v1.1.4 2021-06-15 12:59:00 +00:00
85343fcefe Bump version (changelog ignore) 2021-06-15 14:49:46 +02:00
b11dfde6e6 Merge pull request #12 from InseeFrLab/email-typo
Fix typo on email
2021-06-15 14:38:27 +02:00
38d2108f02 Fix typo on email 2021-06-15 09:47:22 +02:00
2b67544517 Update changelog v1.1.3 2021-06-14 22:36:25 +00:00
0d443ca88e Add missing key in Login for providers 2021-06-15 00:31:20 +02:00
7 changed files with 86 additions and 5 deletions

View File

@ -1,3 +1,18 @@
### **1.1.5** (2021-06-15)
- #11: Provide socials in the register
### **1.1.4** (2021-06-15)
- Merge pull request #12 from InseeFrLab/email-typo
Fix typo on email
- Fix typo on email
### **1.1.3** (2021-06-14)
- Add missing key in Login for providers
### **1.1.2** (2021-06-14)

View File

@ -1,6 +1,6 @@
{
"name": "keycloakify",
"version": "1.1.2",
"version": "1.1.5",
"description": "Keycloak theme generator for Reacts app",
"repository": {
"type": "git",

View File

@ -13,7 +13,7 @@
<#recover>
</#attempt>
})(),
"emal": (function (){
"email": (function (){
<#attempt>
return "${user.email!''}" || undefined;
<#recover>
@ -64,4 +64,4 @@
},
}
</script>
</script>

View File

@ -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>

View File

@ -120,7 +120,7 @@ export const Login = memo(({ kcContext, ...props }: { kcContext: KcContext.Login
<ul className={cx(props.kcFormSocialAccountListClass, social.providers.length > 4 && props.kcFormSocialAccountDoubleListClass)}>
{
social.providers.map(p =>
<li className={cx(props.kcFormSocialAccountListLinkClass)}>
<li key={p.providerId} className={cx(props.kcFormSocialAccountListLinkClass)}>
<a href={p.loginUrl} id={`zocial-${p.alias}`} className={cx("zocial", p.providerId)}>
<span>{p.displayName}</span>
</a>

View File

@ -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 & {

View File

@ -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 = {