Skip to content

Commit 80f8cec

Browse files
author
wecoding
committed
refactor: remove Coding identity provider
- Remove Coding identity provider from the creation form - Remove unused token parameter from createStyles hook - Change identity provider scopes from string to string array in TypeScript definitions Signed-off-by: wecoding <wecoding@yeah.net>
1 parent 88c864c commit 80f8cec

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/pages/IdentityProvider/Create/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { IdentityProviderType, ProviderCategory } from '@/enums';
1616
import { Gitee } from './Gitee';
1717
import { GitHub } from './GitHub';
1818
import { WeChatMiniProgram } from './WeChatMiniProgram';
19-
import { Coding } from './Coding';
2019
import { Google } from './Google';
2120

2221
import useIdentityProviderHook from './_hooks';
@@ -151,9 +150,6 @@ const CreatePolicy: React.FC = () => {
151150
if (type === IdentityProviderType.WeChatMiniProgram) {
152151
return <WeChatMiniProgram key={type} />;
153152
}
154-
if (type === IdentityProviderType.Coding) {
155-
return <Coding key={type} form={formRef} />;
156-
}
157153
if (type === IdentityProviderType.Google) {
158154
return <Google key={type} form={formRef} />;
159155
}

src/pages/Login/ProviderIcons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const getRedirectUri = (appConf: App.Application, idp: App.IdentityProvider) =>
2626
return redirectURL;
2727
};
2828

29-
const useStyle = createStyles(({ token }) => {
29+
const useStyle = createStyles(() => {
3030
return {
3131
main: {
3232
[`.${prefixCls}`]: {

src/typings/root.api.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ declare namespace App {
209209
mode: OIDCMode;
210210
clientID: string;
211211
clientSecret: string;
212-
scopes: string;
212+
scopes: string[];
213213
redirectURL: string;
214214
};
215215

@@ -219,7 +219,7 @@ declare namespace App {
219219
tokenURL: string;
220220
userInfoURL: string;
221221
};
222-
scopes: string;
222+
scopes: string[];
223223
clientID: string;
224224
clientSecret: string;
225225
redirectURL: string;

0 commit comments

Comments
 (0)