Skip to content

Commit

Permalink
fix: input field for password visiblity (#283)
Browse files Browse the repository at this point in the history
* fix: input field for password visiblity

* chore: add scripts to layouts

* fix: bump @ory/elements v0.1.0-beta.1
  • Loading branch information
Benehiko authored Aug 31, 2023
1 parent 8188b29 commit 356d98a
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 34 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@ory/client": "1.1.50",
"@ory/elements-markup": "0.0.1-beta.13",
"@ory/elements-markup": "0.1.0-beta.1",
"@ory/integrations": "1.1.4",
"axios": "1.2.6",
"body-parser": "1.20.2",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const createLoginRoute: RouteCreator =
flow.oauth2_login_request.client?.client_id
}`,
}),
flow: flow as SelfServiceFlow,
flow: flow,
flowType: "login",
cardImage: logoUrl,
additionalProps: {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/recovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const createRecoveryRoute: RouteCreator =
res.render("recovery", {
card: UserAuthCard({
title: "Recover your account",
flow: flow as SelfServiceFlow,
flow: flow,
flowType: "recovery",
cardImage: logoUrl,
additionalProps: {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const createVerificationRoute: RouteCreator =
res.render("verification", {
card: UserAuthCard({
title: "Verify your account",
flow: flow as SelfServiceFlow,
flow: flow,
flowType: "verification",
cardImage: logoUrl,
additionalProps: {
Expand Down
2 changes: 2 additions & 0 deletions views/consent.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div id="consent">
{{{card}}}

{{> scripts}}
</div>
5 changes: 3 additions & 2 deletions views/layouts/auth.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{{{body}}}
{{> ory_branding}}
</div>


{{> scripts }}
</main>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion views/layouts/settings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{{> ory_branding}}
</div>
</div>
{{> scripts }}
</main>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion views/layouts/welcome.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{{> ory_branding}}
</div>
</div>
{{> scripts }}
</main>
</body>
</html>
</html>
12 changes: 6 additions & 6 deletions views/login.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

{{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}}

<script type="text/javascript">
document.getElementsByName("webauthn_login_trigger").forEach((v) =>
{ v.addEventListener("click", () => {
{{{webAuthnHandler}}}
}) })
<script type="text/javascript">
document.getElementsByName("webauthn_login_trigger").forEach((v) => {
v.addEventListener("click", () => {
{{{webAuthnHandler}}}
})
})
</script>
</div>

3 changes: 3 additions & 0 deletions views/partials/scripts.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{! Scripts }}
<script src="assets/passwordInput.js"></script>

2 changes: 1 addition & 1 deletion views/partials/standard_headers.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<link type="text/css" rel="stylesheet" href="style.css" />
<link type="text/css" rel="stylesheet" href="theme.css" />
{{! Managed UI styling }}
<link type="text/css" rel="stylesheet" href="main.css" />
<link type="text/css" rel="stylesheet" href="main.css" />
2 changes: 1 addition & 1 deletion views/recovery.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div id='recovery'>
{{{card}}}
</div>
</div>
14 changes: 7 additions & 7 deletions views/registration.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

{{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}}

<script type="text/javascript">
document.getElementsByName("webauthn_register_trigger").forEach((v) =>
{ v.addEventListener("click", () => {
{{{webAuthnHandler}}}
}) })
</script>
<script type="text/javascript">
document.getElementsByName("webauthn_register_trigger").forEach((v) => {
v.addEventListener("click", () => {
{{{webAuthnHandler}}}
})
})
</script>
</div>

13 changes: 7 additions & 6 deletions views/settings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

{{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}}

<script type="text/javascript">
document.getElementsByName("webauthn_register_trigger").forEach((v) =>
{ v.addEventListener("click", () => {
{{{webAuthnHandler}}}
}) })
<script type="text/javascript">
document.getElementsByName("webauthn_register_trigger").forEach((v) => {
v.addEventListener("click", () => {
{{{webAuthnHandler}}}
})
})
</script>

</div>
</div>
2 changes: 1 addition & 1 deletion views/verification.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div id='verification'>
{{{card}}}
</div>
</div>

0 comments on commit 356d98a

Please sign in to comment.