@secrecy/lib 1.73.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,
|
|
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,7 +52,7 @@ export async function login({ appId, userId, path, redirect, scopes, backPath, s
|
|
|
52
52
|
const infos = {
|
|
53
53
|
appUrl,
|
|
54
54
|
appId,
|
|
55
|
-
|
|
55
|
+
context,
|
|
56
56
|
redirect,
|
|
57
57
|
path,
|
|
58
58
|
scopes,
|
|
@@ -4,7 +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
|
-
|
|
7
|
+
context?: {
|
|
8
|
+
userId?: string;
|
|
9
|
+
orgId?: string;
|
|
10
|
+
};
|
|
8
11
|
appUrl: string;
|
|
9
12
|
backPath?: string;
|
|
10
13
|
path?: string | null | undefined;
|
|
@@ -24,5 +27,5 @@ export declare function getSecrecyClient(opts?: {
|
|
|
24
27
|
type LoginResponse<Params extends UseSecrecyParams> = Params extends {
|
|
25
28
|
redirect: true;
|
|
26
29
|
} ? SecrecyClient | null : SecrecyClient;
|
|
27
|
-
export declare function login<Params extends UseSecrecyParams>({ appId,
|
|
30
|
+
export declare function login<Params extends UseSecrecyParams>({ appId, context, path, redirect, scopes, backPath, session, secrecyUrls, }: Params): Promise<LoginResponse<Params>>;
|
|
28
31
|
export {};
|
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.73.
|
|
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",
|