Closed ingoradatz closed 1 year ago
Huh, I suppose it's unsurprising that you're getting a "Module not found" error here because dom.ts doesn't actually exist:
https://deno.land/x/simplewebauthn@v8.3.2/packages/typescript-types/src?source
Back when I only published to NPM this file would get generated and bundled into the published package. I guess I need to start tracking this file and periodically keeping it up-to-date so that it's available in Deno...
I wonder how I got this far with thinking this would work. I'm admittedly new to Deno development myself so I must not have "properly" bootstrapped a Deno project to test that importing from deno.land would pull this in without issue.
Let me think on how best to address this. Maybe it will be as easy as tracking this file and occasionally updating it.
@ingoradatz This should be resolved with the release of v8.3.3:
$> deno vendor https://deno.land/x/simplewebauthn/deno/server.ts --no-config --force
Warning Implicitly using latest version (v8.3.3) for https://deno.land/x/simplewebauthn/deno/server.ts
Vendored 169 modules into vendor/ directory.
To use vendored modules, specify the `--import-map vendor/import_map.json` flag when invoking Deno subcommands or add an `"importMap": "<path_to_vendored_import_map>"` entry to a deno.json file.
Nice. I will give it a try.
Meanwhile i got it working on deno by building it and copying it over but this has no future :-) and i've hoped you will find a solution.
My experiment is to run it as function on deno deploy. It looks good so far and i've learned a lot from your code comments. Actually i also want to use the deno KV storage for the session related data of SWA.
Are you interested in discussing security implications when this works?
Are you interested in discussing security implications when this works?
I'd be interested in following along, sure. Opening a Discussion here is probably the best way to start the conversation when you're ready.
@ingoradatz
There is a simple deno.deploy using kv example at passkeys.deno.dev. It uses oak sessions and an early 8.x version of simplewebauthn. It may give you a head start.
@MasterKale
The issue with webcrypto on cloudflare needing a check on the global namespace to know which webcrypto to import was where we left off in August. It's good to see that being resolved with other PRs. But, I have not verified that the proposed PR would not break Deno and am too busy on other fronts at the moment to do so – so just a note.
Steve
sorry... repo: https://github.com/maximousblk/passkeys-demo
@spendres Thank you for the hint
Describe the issue
When I try the vendor the deno package it fails with
Reproduction Steps
$> deno vendor https://deno.land/x/simplewebauthn/deno/server.ts --no-config --force
Expected behavior
It should download the simplewebauthn package to the
vendor/deno.land/x
folderAdditional context
The
packages/typescript-types/src/dom.ts
file is normally automatically generated when simplewebauthn is packaged for uploading to deno.land? Maybe a CI-Problem?