mirror of
https://github.com/aljazceru/react-native-pubky.git
synced 2025-12-17 06:34:21 +01:00
35 lines
1.3 KiB
HTML
35 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/pubky.svg" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Pubky Auth Demo</title>
|
|
<link rel="stylesheet" href="./src/index.css" />
|
|
<script type="module">
|
|
import "@synonymdev/pubky"
|
|
</script>
|
|
<script type="module" src="/src/pubky-auth-widget.js"></script>
|
|
</head>
|
|
<body>
|
|
<pubky-auth-widget
|
|
id="widget"
|
|
relay="https://demo.httprelay.io/link/"
|
|
>
|
|
</pubky-auth-widget>
|
|
|
|
<main>
|
|
<h1>Third Party app!</h1>
|
|
<p>this is a demo for using Pubky Auth in an unhosted (no backend) app.</p>
|
|
<form>
|
|
<label style="display:block">
|
|
<input type="checkbox" onChange="document.getElementById('widget').switchTestnet()">testnet (use local test network)</input>
|
|
</label>
|
|
<label style="display:block">
|
|
<input type="checkbox" onChange="let w = document.getElementById('widget'); w.caps.length > 0 ? w.setCapabilities(null) : w.setCapabilities('/pub/pubky.app/:rw,/pub/example.com/nested:rw')">Authz (Authorization, set if your pubky has an account on a Homeserver)</input>
|
|
</label>
|
|
</form>
|
|
</main>
|
|
</body>
|
|
</html>
|