Skip to content

Commit

Permalink
fix: Use label to generate button text
Browse files Browse the repository at this point in the history
  • Loading branch information
nsklikas committed Dec 8, 2023
1 parent ed2c72a commit 0494160
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker/kratos/kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ selfservice:
provider: "microsoft"
mapper_url: "file:///etc/config/kratos/microsoft_schema.jsonnet"
scope: ["profile", "email", "address", "phone"]
label: EntraID
courier:
smtp:
connection_uri: smtps://test:test@mailslurper:1025/?skip_ssl_verify=true
12 changes: 6 additions & 6 deletions ui/components/NodeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const NodeInputOIDC: FC<NodeInputProps> = ({
disabled,
dispatchSubmit,
}) => {
const provider = (attributes.value as string).split("_")[0];
if (provider === "hydra") {
return <></>;
}
if (node.meta.label) {
node.meta.label.text = provider.charAt(0).toUpperCase() + provider.slice(1);
if (node.meta.label?.context) {
if ("provider" in node.meta.label.context) {
const provider = String(node.meta.label.context.provider);
node.meta.label.text =
provider.charAt(0).toUpperCase() + provider.slice(1);
}
}
const props = {
node: node,
Expand Down

0 comments on commit 0494160

Please sign in to comment.