Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- run: pnpm run lint
- run: pnpm run format:check
- run: pnpm run build
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- run: pnpm audit --audit-level=high
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --no-frozen-lockfile
- run: pnpm run lint
- run: pnpm run format:check
- run: pnpm run build

audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --no-frozen-lockfile
- run: pnpm audit --audit-level=high
54 changes: 27 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Release
on:
release:
types: [published]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- name: Publish to npm
run: pnpm publish --access public --no-git-checks --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Release

on:
release:
types: [published]

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"
cache: "pnpm"
- run: pnpm install --no-frozen-lockfile
- name: Publish to npm
run: pnpm publish --access public --no-git-checks --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
123 changes: 71 additions & 52 deletions examples/passkey/assets/index.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Securio Passkey Example</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Securio Passkey Example</h1>
<p>This example demonstrates WebAuthn passkey registration and authentication using the Securio library.</p>

<!-- Registration Section -->
<div class="section">
<h2>🔐 Register Passkey</h2>
<p>Create a new passkey for your account. This will use your device's biometric authentication or security key.</p>

<form id="register-form">
<label>
Username:
<input type="text" id="username" required placeholder="Enter your username" value="[email protected]" />
</label>
<label>
Display Name:
<input type="text" id="display-name" required placeholder="Your display name" value="Demo User" />
</label>
<button type="submit" id="register-btn">Register Passkey</button>
</form>
<div id="register-status"></div>
<div id="credential-info"></div>
</div>

<!-- Authentication Section -->
<div class="section">
<h2>🔑 Login with Passkey</h2>
<p>Use your registered passkey to authenticate. No password required!</p>

<button id="login-btn" disabled>Login with Passkey</button>
<div id="login-status"></div>
</div>

<!-- Info Section -->
<div class="section">
<h2>ℹ️ Information</h2>
<div id="info-status" class="status info">
Ready to register a passkey. Make sure you're using HTTPS or localhost for WebAuthn to work.
</div>
</div>

<script type="module" src="script.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Securio Passkey Example</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Securio Passkey Example</h1>
<p>
This example demonstrates WebAuthn passkey registration and authentication
using the Securio library.
</p>

<!-- Registration Section -->
<div class="section">
<h2>🔐 Register Passkey</h2>
<p>
Create a new passkey for your account. This will use your device's
biometric authentication or security key.
</p>

<form id="register-form">
<label>
Username:
<input
type="text"
id="username"
required
placeholder="Enter your username"
value="[email protected]"
/>
</label>
<label>
Display Name:
<input
type="text"
id="display-name"
required
placeholder="Your display name"
value="Demo User"
/>
</label>
<button type="submit" id="register-btn">Register Passkey</button>
</form>
<div id="register-status"></div>
<div id="credential-info"></div>
</div>

<!-- Authentication Section -->
<div class="section">
<h2>🔑 Login with Passkey</h2>
<p>Use your registered passkey to authenticate. No password required!</p>

<button id="login-btn" disabled>Login with Passkey</button>
<div id="login-status"></div>
</div>

<!-- Info Section -->
<div class="section">
<h2>ℹ️ Information</h2>
<div id="info-status" class="status info">
Ready to register a passkey. Make sure you're using HTTPS or localhost
for WebAuthn to work.
</div>
</div>

<script type="module" src="script.js"></script>
</body>
</html>
Loading
Loading