Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5556a02fc | |||
1050f4d928 | |||
9276b08f4b | |||
a501af669c | |||
85343fcefe | |||
b11dfde6e6 | |||
38d2108f02 | |||
2b67544517 | |||
0d443ca88e |
15
CHANGELOG.md
15
CHANGELOG.md
@ -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)
|
### **1.1.2** (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "1.1.2",
|
"version": "1.1.5",
|
||||||
"description": "Keycloak theme generator for Reacts app",
|
"description": "Keycloak theme generator for Reacts app",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<#recover>
|
<#recover>
|
||||||
</#attempt>
|
</#attempt>
|
||||||
})(),
|
})(),
|
||||||
"emal": (function (){
|
"email": (function (){
|
||||||
<#attempt>
|
<#attempt>
|
||||||
return "${user.email!''}" || undefined;
|
return "${user.email!''}" || undefined;
|
||||||
<#recover>
|
<#recover>
|
||||||
@ -64,4 +64,4 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -185,5 +185,59 @@
|
|||||||
return out;
|
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>
|
</script>
|
@ -120,7 +120,7 @@ export const Login = memo(({ kcContext, ...props }: { kcContext: KcContext.Login
|
|||||||
<ul className={cx(props.kcFormSocialAccountListClass, social.providers.length > 4 && props.kcFormSocialAccountDoubleListClass)}>
|
<ul className={cx(props.kcFormSocialAccountListClass, social.providers.length > 4 && props.kcFormSocialAccountDoubleListClass)}>
|
||||||
{
|
{
|
||||||
social.providers.map(p =>
|
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)}>
|
<a href={p.loginUrl} id={`zocial-${p.alias}`} className={cx("zocial", p.providerId)}>
|
||||||
<span>{p.displayName}</span>
|
<span>{p.displayName}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -130,6 +130,15 @@ export declare namespace KcContext {
|
|||||||
* (https://github.com/micedre/keycloak-mail-whitelisting)
|
* (https://github.com/micedre/keycloak-mail-whitelisting)
|
||||||
*/
|
*/
|
||||||
authorizedMailDomains?: string[];
|
authorizedMailDomains?: string[];
|
||||||
|
social: {
|
||||||
|
displayInfo: boolean;
|
||||||
|
providers?: {
|
||||||
|
loginUrl: string;
|
||||||
|
alias: string;
|
||||||
|
providerId: string;
|
||||||
|
displayName: string;
|
||||||
|
}[]
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Info = Common & {
|
export type Info = Common & {
|
||||||
|
@ -168,7 +168,10 @@ export const kcRegisterContext: KcContext.Register = {
|
|||||||
"*.yet-another-example.com",
|
"*.yet-another-example.com",
|
||||||
"*.example.com",
|
"*.example.com",
|
||||||
"hello-world.com"
|
"hello-world.com"
|
||||||
]
|
],
|
||||||
|
"social": {
|
||||||
|
"displayInfo": true
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const kcInfoContext: KcContext.Info = {
|
export const kcInfoContext: KcContext.Info = {
|
||||||
|
Reference in New Issue
Block a user