Skip to content

Commit 41872e0

Browse files
committed
fix: support for hyphens in oidc creation tool
1 parent 6406d1d commit 41872e0

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/components/create-oidc-client-tool.astro

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
return;
2424
}
2525

26-
if (!/^[a-zA-Z0-9]*$/.test(clientName)) {
27-
alert("Client name can only contain alphanumeric characters.")
26+
if (!/^[a-zA-Z0-9-]*$/.test(clientName)) {
27+
alert(
28+
"Client name can only contain alphanumeric characters and hyphens.",
29+
);
2830
return;
2931
}
3032

@@ -38,7 +40,13 @@
3840
<div class="tool-fields">
3941
<label class="tool-label">
4042
Client Name
41-
<input name="client-name" type="text" class="tool-input" placeholder="myapp" spellcheck="false" />
43+
<input
44+
name="client-name"
45+
type="text"
46+
class="tool-input"
47+
placeholder="myapp"
48+
spellcheck="false"
49+
/>
4250
</label>
4351
</div>
4452
<button type="submit" class="tool-submit">Create OIDC Client</button>

0 commit comments

Comments
 (0)