mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
fix(experience): fix get sso connectors bug
gix get sso connectors bug
This commit is contained in:
parent
dea41c96e8
commit
17534fcd27
3 changed files with 4 additions and 4 deletions
|
@ -206,7 +206,7 @@ export const getSsoConnectors = async (email: string) =>
|
|||
email,
|
||||
},
|
||||
})
|
||||
.json<string[]>();
|
||||
.json<{ connectorIds: string[] }>();
|
||||
|
||||
export const getSsoAuthorizationUrl = async (connectorId: string, payload: unknown) => {
|
||||
await initInteraction(InteractionEvent.SignIn);
|
||||
|
|
|
@ -56,8 +56,8 @@ const useCheckSingleSignOn = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
const connectors = result
|
||||
?.map((connectorId) => availableSsoConnectorsMap.get(connectorId))
|
||||
const connectors = result?.connectorIds
|
||||
.map((connectorId) => availableSsoConnectorsMap.get(connectorId))
|
||||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions -- make the type more specific
|
||||
.filter((connector): connector is SsoConnectorMetadata => Boolean(connector));
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ const useSingleSignOnWatch = (identifierInput?: IdentifierInputValue) => {
|
|||
return false;
|
||||
}
|
||||
|
||||
const connectors = result
|
||||
const connectors = result.connectorIds
|
||||
.map((connectorId) => availableSsoConnectorsMap.get(connectorId))
|
||||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions -- make the type more specific
|
||||
.filter((connector): connector is SsoConnectorMetadata => Boolean(connector));
|
||||
|
|
Loading…
Reference in a new issue