Replies: 9 comments 14 replies
-
Hello @hapaxlife, can you help refresh my memory what Fresh is? As for JSR support, I'm intrigued but haven't sat down to figure out what it might take to migrate things from Deno + dnt for server and types. It also remains to be seen if JSR will see wide adoption. I see that JSR is becoming a first-class package repo in Deno 1.42, so that's progress. And I know it's possible to add JSR as a package repo for Node. I'd say JSR is a strong contender for the next place I aim to start deploying SimpleWebAuthn to. Yours is the first voice asking for deployments to alternative package repos than NPM and https://deno.land/x, but more people may chime in later. For now I'm content to wait and see how things play out. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer Fresh is a full stack modern web framework for JavaScript and TypeScript developers. It is based on Deno and developped by Deno team. It is a SSR with a concept of island for shipping javascript into page. For the client auth page, I import in my SSR Fresh the browser library (the origin of my initial demand). The server renders the page with the browser javascript code that is shipped to the client. The fact that browser is not exported in Deno is not blocking. We have just different ways of import in the code. |
Beta Was this translation helpful? Give feedback.
-
Hello @MasterKale, I am chiming in because I am running into the same issue with writing client-side code in deno. I'm still very new to web development, so my apologies if anything I'm adding here is a little uninformed. I am using Fresh in a web application and noticed there is no importable Also while looking into this I noticed there are missing file extensions on imports throughout the entire |
Beta Was this translation helpful? Give feedback.
-
Hello @hapaxlife, @jpaoad31, @robvanvolt, and @sachaw, I'm pinging you all in here because you've all expressed varying degrees of interest in using SimpleWebAuthn in your Deno projects. I've been experimenting with hosting this project over on JSR.io in PR #634. I'm happy to report that I have "v11.0.0-alpha2" releases of browser, server, and types published over there:
Can I ask for your help in putting these libraries through their paces? I'm fairly confident that
And heck, if you're so inclined, I'm also curious about your experiences using JSR is tentatively a really cool way to host stuff, but I don't want to make it onerous for users to pull into their projects if I missed anything while experimenting with replacing the current deno.land/x hosting with JSR, if not also NPM hosting 🤔 |
Beta Was this translation helpful? Give feedback.
-
Progress report: I'm running some final tests on the big refactor I've been working on. Preliminary results are looking good, for example here's @simplewebauthn/browser running in a Deno Fresh project, installing " islands/WebAuthnJSR.tsx import { browserSupportsWebAuthn, bufferToBase64URLString } from '@simplewebauthn/browser';
import { AuthenticatorAttachment } from '@simplewebauthn/types';
export default function WebAuthn() {
const supportsWebAuthn = browserSupportsWebAuthn();
const attachment: AuthenticatorAttachment = 'platform';
return (
<div class="py-6 items-center">
<h1>@simplewebauthn/browser (JSR)</h1>
<h2>WebAuthn supported?</h2>
<h3>{`${supportsWebAuthn} (Client)`}</h3>
<p>bufferToBase64URLString: {bufferToBase64URLString(new Uint8Array([0, 0, 0, 0]))}</p>
<p>attachment: {attachment}</p>
</div>
);
}
import { browserSupportsWebAuthn, bufferToBase64URLString } from "https://deno.land/x/[email protected]/deno/browser.ts";
import { AuthenticatorAttachment } from 'https://deno.land/x/[email protected]/deno/types.ts';
export default function WebAuthn() {
const supportsWebAuthn = browserSupportsWebAuthn();
const attachment: AuthenticatorAttachment = 'cross-platform';
return (
<div class="py-6 items-center">
<h1>@simplewebauthn/browser (deno.land/x)</h1>
<h2>WebAuthn supported?</h2>
<h3>{`${supportsWebAuthn} (Client)`}</h3>
<p>bufferToBase64URLString: {bufferToBase64URLString(new Uint8Array([0, 0, 0, 0]))}</p>
<p>attachment: {attachment}</p>
</div>
);
} EDIT: Importing from deno.land/x doesn't work anymore since I'm using import maps in @simplewebauthn/browser and @simplewebauthn/server...see #542 (reply in thread) Things are looking up... |
Beta Was this translation helpful? Give feedback.
-
I don't see a problem relying on jsr and dropping denoland. But, you could use deno.json import maps to transform your urls to names that vibe with jsr. |
Beta Was this translation helpful? Give feedback.
-
Oh, then you will have to abandon deno.land/x to support jsr. |
Beta Was this translation helpful? Give feedback.
-
Hello all, SimpleWebAuthn v12.0.0 marks the beginning of official support for installation of all three packages from JSR as well as from NPM 🚀 See here for full release notes: https://github.com/MasterKale/SimpleWebAuthn/releases/tag/v12.0.0 |
Beta Was this translation helpful? Give feedback.
-
Thank you, @MasterKale, for your unwavering effort to update this library. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thanks for your library :-)
You have export
server
&type
for Deno. Could you do the same forbrowser
in order to user it in Fresh ?Do you plan to put it also on jsr ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions