Skip to content

Commit 1e7981d

Browse files
OAuth: space separate scope for generic oath
1 parent ce2d2db commit 1e7981d

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

client/packages/lowcoder/src/comps/controls/iconControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ type ChangeModeAction = {
208208
useCodeEditor: boolean;
209209
};
210210

211-
function IconControlView(props: { value: string }) {
211+
export function IconControlView(props: { value: string }) {
212212
const { value } = props;
213213
const icon = useIcon(value);
214214
if (icon) {

client/packages/lowcoder/src/pages/setting/idSource/OAuthForms/GenericOAuthForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function GenericOAuthForm(props: GenericOAuthFormProp) {
120120
tokenEndpoint: res.data.token_endpoint,
121121
userInfoEndpoint: res.data.userinfo_endpoint,
122122
jwksUri: res.data.jwks_uri,
123-
scope: res.data.scopes_supported.join(','),
123+
scope: res.data.scopes_supported.join(' '),
124124
sourceMappings: sourceMappingKeys.map(sourceKey => ({
125125
[sourceKey]: sourceKey,
126126
}))

client/packages/lowcoder/src/pages/setting/idSource/list.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { currentOrgAdmin } from "../../../util/permissionUtils";
3535
import CreateModal from "./createModal";
3636
import _ from "lodash";
3737
import { HelpText } from "components/HelpText";
38+
import { IconControlView } from "@lowcoder-ee/comps/controls/iconControl";
3839

3940
export const IdSourceList = (props: any) => {
4041
const user = useSelector(getUser);
@@ -137,10 +138,12 @@ export const IdSourceList = (props: any) => {
137138
render={(value: AuthType, record: ConfigItem) => (
138139
<SpanStyled disabled={authTypeDisabled(value, enableEnterpriseLogin)}>
139140
{
140-
<img
141-
src={ServerAuthTypeInfo[value as AuthType]?.logo || GeneralLoginIcon}
142-
alt={value}
143-
/>
141+
(record as any).sourceIcon
142+
? <span className="sourceIcon"><IconControlView value={(record as any).sourceIcon} /></span>
143+
: <img
144+
src={ServerAuthTypeInfo[value as AuthType]?.logo || GeneralLoginIcon}
145+
alt={value}
146+
/>
144147
}
145148
<span>
146149
{value === AuthType.Generic

client/packages/lowcoder/src/pages/setting/idSource/styledComponents.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ export const SpanStyled = styled.div<{ disabled: boolean }>`
6262
align-items: center;
6363
height: 100%;
6464
65-
img {
65+
img, .sourceIcon {
6666
width: 25px;
6767
height: 25px;
6868
margin-right: 12px;
69+
text-align: center;
6970
opacity: ${(props) => props.disabled && "0.4"};
7071
}
7172

0 commit comments

Comments
 (0)