@secrecy/lib 1.72.0 → 1.73.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.
|
@@ -44,7 +44,7 @@ export function getSecrecyClient(opts = {}) {
|
|
|
44
44
|
secrecyUrls: opts.secrecyUrls,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
export async function login({ appId, path, redirect, scopes, backPath, session, secrecyUrls, }) {
|
|
47
|
+
export async function login({ appId, context, path, redirect, scopes, backPath, session, secrecyUrls, }) {
|
|
48
48
|
return await new Promise((resolve, reject) => {
|
|
49
49
|
const appUrl = window.location.origin;
|
|
50
50
|
const client = getSecrecyClient({ secrecyUrls });
|
|
@@ -52,6 +52,7 @@ export async function login({ appId, path, redirect, scopes, backPath, session,
|
|
|
52
52
|
const infos = {
|
|
53
53
|
appUrl,
|
|
54
54
|
appId,
|
|
55
|
+
context,
|
|
55
56
|
redirect,
|
|
56
57
|
path,
|
|
57
58
|
scopes,
|
|
@@ -4,6 +4,10 @@ import type { SecrecyUrls } from '../base-client.js';
|
|
|
4
4
|
export declare function parseInfos(): SecrecyUserApp | null;
|
|
5
5
|
export interface HashInfos {
|
|
6
6
|
appId: string;
|
|
7
|
+
context?: {
|
|
8
|
+
userId?: string;
|
|
9
|
+
orgId?: string;
|
|
10
|
+
};
|
|
7
11
|
appUrl: string;
|
|
8
12
|
backPath?: string;
|
|
9
13
|
path?: string | null | undefined;
|
|
@@ -23,5 +27,5 @@ export declare function getSecrecyClient(opts?: {
|
|
|
23
27
|
type LoginResponse<Params extends UseSecrecyParams> = Params extends {
|
|
24
28
|
redirect: true;
|
|
25
29
|
} ? SecrecyClient | null : SecrecyClient;
|
|
26
|
-
export declare function login<Params extends UseSecrecyParams>({ appId, path, redirect, scopes, backPath, session, secrecyUrls, }: Params): Promise<LoginResponse<Params>>;
|
|
30
|
+
export declare function login<Params extends UseSecrecyParams>({ appId, context, path, redirect, scopes, backPath, session, secrecyUrls, }: Params): Promise<LoginResponse<Params>>;
|
|
27
31
|
export {};
|
package/dist/types/client.d.ts
CHANGED
|
@@ -4862,6 +4862,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4862
4862
|
appUrl: string;
|
|
4863
4863
|
orgId?: string | undefined;
|
|
4864
4864
|
appId?: string | undefined;
|
|
4865
|
+
userId?: string | undefined;
|
|
4865
4866
|
scopes?: {
|
|
4866
4867
|
email: boolean;
|
|
4867
4868
|
} | undefined;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@secrecy/lib",
|
|
3
3
|
"author": "Anonymize <anonymize@gmail.com>",
|
|
4
4
|
"description": "Anonymize Secrecy Library",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.73.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@js-temporal/polyfill": "^0.5.1",
|
|
78
|
-
"@secrecy/trpc-api-types": "1.33.0-
|
|
78
|
+
"@secrecy/trpc-api-types": "1.33.0-fix-app-context.1",
|
|
79
79
|
"@trpc/client": "11.5.1",
|
|
80
80
|
"@trpc/server": "^11.5.1",
|
|
81
81
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|