@segmentstream-cloud/app 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oauth-completion.js +2 -2
- package/package.json +1 -1
package/dist/oauth-completion.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { randomBytes } from "node:crypto";
|
|
2
1
|
import { SEGMENTSTREAM_LOGO_URI } from "./logo.js";
|
|
3
2
|
function escape(value) {
|
|
4
3
|
return value.replace(/[&<>"']/g, (character) => ({
|
|
@@ -11,7 +10,8 @@ function escape(value) {
|
|
|
11
10
|
}
|
|
12
11
|
/** Keep a copyable PKCE-bound code visible while trying the client's loopback callback. */
|
|
13
12
|
export function oauthCompletion(options) {
|
|
14
|
-
|
|
13
|
+
// Web Crypto keeps this module bundleable for client components (no node: imports).
|
|
14
|
+
const nonce = btoa(String.fromCharCode(...crypto.getRandomValues(new Uint8Array(18))));
|
|
15
15
|
const redirect = options.redirect;
|
|
16
16
|
const code = redirect === undefined ? null : new URL(redirect).searchParams.get("code");
|
|
17
17
|
const title = options.approved === false ? "Request denied" : "Authorization complete";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream-cloud/app",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Sign-in, users, permissions, the ontology client and warehouse data access for SegmentStream workspace apps built with Next.js.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|