Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ export function DefaultButtonSocial({
const oidcNodeCount =
ui.nodes.filter((node) => node.group === "oidc").length ?? 0

const Logo = logos[attributes.value]
// Ideally, kratos would return the provider name in the context
// At the moment it only returns the label (misleadingly named `provider`).
// But changing that would be a breaking change.
// So we have to extract the provider name from the id, which sometimes might contain a - followed by a unique ID.
// TODO(kratos): Add provider to the context
const Logo = logos[(attributes.value as string).split("-")[0]]

const showLabel =
_showLabel ?? (oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0)
Expand Down