mirror of
https://github.com/logto-io/logto.git
synced 2025-03-24 22:41:28 -05:00
refactor(ui): rename native supported connctors param name (#888)
rename native supported connctors param name
This commit is contained in:
parent
9fa13a24ae
commit
85e475d85e
4 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ describe('SecondarySocialSignIn', () => {
|
||||||
platform: 'web',
|
platform: 'web',
|
||||||
getPostMessage: jest.fn(() => jest.fn()),
|
getPostMessage: jest.fn(() => jest.fn()),
|
||||||
callbackLink: '/logto:',
|
callbackLink: '/logto:',
|
||||||
supportedSocialConnectorIds: socialConnectors.map(({ id }) => id),
|
supportedSocialConnectorTargets: socialConnectors.map(({ id }) => id),
|
||||||
};
|
};
|
||||||
/* eslint-enable @silverhand/fp/no-mutation */
|
/* eslint-enable @silverhand/fp/no-mutation */
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,7 +33,7 @@ describe('filterSocialConnectors', () => {
|
||||||
// @ts-expect-error mock global object
|
// @ts-expect-error mock global object
|
||||||
globalThis.logtoNativeSdk = {
|
globalThis.logtoNativeSdk = {
|
||||||
platform: 'ios',
|
platform: 'ios',
|
||||||
supportedSocialConnectorIds: ['Web', 'WeChat'],
|
supportedSocialConnectorTargets: ['Web', 'WeChat'],
|
||||||
};
|
};
|
||||||
/* eslint-enable @silverhand/fp/no-mutation */
|
/* eslint-enable @silverhand/fp/no-mutation */
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ export const filterSocialConnectors = (socialConnectors?: ConnectorData[]) => {
|
||||||
**/
|
**/
|
||||||
if (
|
if (
|
||||||
platform === 'Native' &&
|
platform === 'Native' &&
|
||||||
getLogtoNativeSdk()?.supportedSocialConnectorIds.includes(target)
|
getLogtoNativeSdk()?.supportedSocialConnectorTargets.includes(target)
|
||||||
) {
|
) {
|
||||||
connectorMap.set(target, connector);
|
connectorMap.set(target, connector);
|
||||||
continue;
|
continue;
|
||||||
|
|
2
packages/ui/src/include.d/global.d.ts
vendored
2
packages/ui/src/include.d/global.d.ts
vendored
|
@ -4,7 +4,7 @@ type LogtoNativeSdkInfo = {
|
||||||
platform: 'ios' | 'android';
|
platform: 'ios' | 'android';
|
||||||
callbackLink: string;
|
callbackLink: string;
|
||||||
getPostMessage: () => (data: { callbackUri?: string; redirectTo?: string }) => void;
|
getPostMessage: () => (data: { callbackUri?: string; redirectTo?: string }) => void;
|
||||||
supportedSocialConnectorIds: string[];
|
supportedSocialConnectorTargets: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
declare const logtoNativeSdk: LogtoNativeSdkInfo | undefined;
|
declare const logtoNativeSdk: LogtoNativeSdkInfo | undefined;
|
||||||
|
|
Loading…
Add table
Reference in a new issue