Skip to content

Commit

Permalink
Allow importing WebAuthnClient from browser
Browse files Browse the repository at this point in the history
Need to separate out this import so that bundlers do not try to import
server-only express modules.
  • Loading branch information
scotttrinh committed Apr 5, 2024
1 parent b491088 commit 5ac296b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions packages/auth-express/package.json
Expand Up @@ -11,15 +11,17 @@
},
"license": "Apache-2.0",
"sideEffects": false,
"files": [
"/dist"
],
"files": ["/dist"],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./webauthn": {
"types": "./dist/webauthn.d.ts",
"default": "./dist/webauthn.js"
}
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion packages/auth-express/src/index.ts
Expand Up @@ -22,7 +22,6 @@ import {
type RouterStack = (RequestHandler | ErrorRequestHandler)[];

export * from "@edgedb/auth-core/errors";
export { WebAuthnClient } from "@edgedb/auth-core/webauthn";

export type BuiltinProviderNames =
| BuiltinOAuthProviderNames
Expand Down
1 change: 1 addition & 0 deletions packages/auth-express/src/webauthn.ts
@@ -0,0 +1 @@
export { WebAuthnClient } from "@edgedb/auth-core/webauthn";

0 comments on commit 5ac296b

Please sign in to comment.