Skip to content

Commit

Permalink
feat: add keyauth:// support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu89 committed Jan 28, 2023
1 parent a2df300 commit 23863c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<div style="border:1px solid black;padding: 10px;">
<zerologin-auth url="https://login.dolu.dev" public-id="d595aad5-4593-4a36-980e-42e0e8a447c1"></zerologin-auth>
<zerologin-auth url="https://login.zerologin.co" public-id="d595aad5-4593-4a36-980e-42e0e8a447c1"></zerologin-auth>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zerologin/elements",
"description": "Zerologin auth web component",
"version": "0.0.8-beta",
"version": "0.0.9-beta",
"private": false,
"files": [
"dist/"
Expand Down
7 changes: 6 additions & 1 deletion src/components/zerologin.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function copy() {
}
async function clickToConnect() {
console.log(lnurl.value);
if (weblnSupported.value) {
// @ts-ignore
await window.webln.enable();
Expand All @@ -82,7 +83,11 @@ async function clickToConnect() {
console.error(e);
}
} else {
window.open(`lightning:${lnurl.value}`, "_self");
let url = lnurl.value;
if (!lnurl.value.startsWith("keyauth://")) {
url = `lightning:${lnurl.value}`;
}
window.open(`${url}`, "_self");
}
}
Expand Down

0 comments on commit 23863c9

Please sign in to comment.