@secrecy/lib 1.72.0 → 1.73.0

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, userId, 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
+ userId,
55
56
  redirect,
56
57
  path,
57
58
  scopes,
@@ -4,6 +4,7 @@ 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
+ userId?: string;
7
8
  appUrl: string;
8
9
  backPath?: string;
9
10
  path?: string | null | undefined;
@@ -23,5 +24,5 @@ export declare function getSecrecyClient(opts?: {
23
24
  type LoginResponse<Params extends UseSecrecyParams> = Params extends {
24
25
  redirect: true;
25
26
  } ? SecrecyClient | null : SecrecyClient;
26
- export declare function login<Params extends UseSecrecyParams>({ appId, path, redirect, scopes, backPath, session, secrecyUrls, }: Params): Promise<LoginResponse<Params>>;
27
+ export declare function login<Params extends UseSecrecyParams>({ appId, userId, path, redirect, scopes, backPath, session, secrecyUrls, }: Params): Promise<LoginResponse<Params>>;
27
28
  export {};
@@ -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.72.0",
5
+ "version": "1.73.0",
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-feat-enhanced-create-org.2",
78
+ "@secrecy/trpc-api-types": "1.33.0-feat-sso-login-userid.1",
79
79
  "@trpc/client": "11.5.1",
80
80
  "@trpc/server": "^11.5.1",
81
81
  "@types/libsodium-wrappers-sumo": "^0.7.8",