Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
411a9112
Commit
411a9112
authored
Apr 24, 2025
by
johnnyjoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: linter error
parent
eb33a604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
CreateIdentityProviderDialog.tsx
web/src/components/CreateIdentityProviderDialog.tsx
+22
-10
No files found.
web/src/components/CreateIdentityProviderDialog.tsx
View file @
411a9112
...
...
@@ -23,11 +23,11 @@ const templateList: IdentityProvider[] = [
tokenUrl
:
"https://github.com/login/oauth/access_token"
,
userInfoUrl
:
"https://api.github.com/user"
,
scopes
:
[
"read:user"
],
fieldMapping
:
{
fieldMapping
:
FieldMapping
.
fromPartial
(
{
identifier
:
"login"
,
displayName
:
"name"
,
email
:
"email"
,
},
}
)
,
},
},
},
...
...
@@ -44,11 +44,11 @@ const templateList: IdentityProvider[] = [
tokenUrl
:
"https://gitlab.com/oauth/token"
,
userInfoUrl
:
"https://gitlab.com/oauth/userinfo"
,
scopes
:
[
"openid"
],
fieldMapping
:
{
fieldMapping
:
FieldMapping
.
fromPartial
(
{
identifier
:
"name"
,
displayName
:
"name"
,
email
:
"email"
,
},
}
)
,
},
},
},
...
...
@@ -65,11 +65,11 @@ const templateList: IdentityProvider[] = [
tokenUrl
:
"https://oauth2.googleapis.com/token"
,
userInfoUrl
:
"https://www.googleapis.com/oauth2/v2/userinfo"
,
scopes
:
[
"https://www.googleapis.com/auth/userinfo.email"
,
"https://www.googleapis.com/auth/userinfo.profile"
],
fieldMapping
:
{
fieldMapping
:
FieldMapping
.
fromPartial
(
{
identifier
:
"email"
,
displayName
:
"name"
,
email
:
"email"
,
},
}
)
,
},
},
},
...
...
@@ -86,11 +86,11 @@ const templateList: IdentityProvider[] = [
tokenUrl
:
""
,
userInfoUrl
:
""
,
scopes
:
[],
fieldMapping
:
{
fieldMapping
:
FieldMapping
.
fromPartial
(
{
identifier
:
""
,
displayName
:
""
,
email
:
""
,
},
}
)
,
},
},
},
...
...
@@ -117,11 +117,11 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
tokenUrl
:
""
,
userInfoUrl
:
""
,
scopes
:
[],
fieldMapping
:
{
fieldMapping
:
FieldMapping
.
fromPartial
(
{
identifier
:
""
,
displayName
:
""
,
email
:
""
,
},
}
)
,
});
const
[
oauth2Scopes
,
setOAuth2Scopes
]
=
useState
<
string
>
(
""
);
const
[
selectedTemplate
,
setSelectedTemplate
]
=
useState
<
string
>
(
"GitHub"
);
...
...
@@ -418,6 +418,18 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
}
fullWidth
/>
<
Typography
className=
"!mb-1"
level=
"body-md"
>
Avatar URL
</
Typography
>
<
Input
className=
"mb-2"
placeholder=
{
"Avatar URL"
}
value=
{
oauth2Config
.
fieldMapping
!
.
avatarUrl
}
onChange=
{
(
e
)
=>
setPartialOAuth2Config
({
fieldMapping
:
{
...
oauth2Config
.
fieldMapping
,
avatarUrl
:
e
.
target
.
value
}
as
FieldMapping
})
}
fullWidth
/>
</>
)
}
<
div
className=
"mt-2 w-full flex flex-row justify-end items-center space-x-1"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment