Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test:
strategy:
matrix:
node: ["22.x"]
node: ["24.x"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
>=20.x
>=24.x
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ Please refer to docs for API Reference available [here](https://docs.tor.us/open

Each sub package is distributed in 3 formats

- `esm` build `dist/lib.esm.js` in es6 format
- `commonjs` build `dist/lib.cjs.js` in es5 format
- `umd` build `dist/auth.umd.min.js` in es5 format without polyfilling corejs minified
- `esm` build `dist/lib.esm/index.js` in es6 format
- `commonjs` build `dist/lib.cjs/index.js` in es5 format

By default, the appropriate format is used for your specified usecase
You can use a different format (if you know what you're doing) by referencing the correct file
Expand Down
50 changes: 20 additions & 30 deletions examples/vue-example/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>
<title>Openlogin Demo</title>
</head>

<head>
<script type="module">
import { Buffer } from "buffer";
import process from "process";
// window.global ||= window;
window.Buffer = Buffer;
window.process = process;
</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet" />
<title>Openlogin Demo</title>
</head>

<body>
<noscript>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed Buffer polyfill but library still uses Buffer

Medium Severity

The <script> tag that polyfilled Buffer and process on window was removed, but src/ed25519/utils.ts still calls Buffer.from() extensively and getED25519Key returns Buffer types. The vue-example's App.vue still imports and calls getED25519Key, and the Vite config has no Buffer resolution or polyfill. This will cause a ReferenceError: Buffer is not defined at runtime in the browser when that code path is exercised.

Fix in Cursor Fix in Web

<strong>
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
<body>
<noscript>
<strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading
Loading