@meistrari/auth-core 2.7.0 → 2.8.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.
package/dist/index.d.mts CHANGED
@@ -908,10 +908,10 @@ declare class ApplicationService {
908
908
  * on the verification URI to authorize the device.
909
909
  *
910
910
  * @param requesterApplicationId - The application requesting authorization
911
- * @param targetApplicationId - The target application to gain access to
911
+ * @param targetApplicationId - The target application to gain access to. Omit it to sign the user in to the requester application itself.
912
912
  * @returns Device authorization details including codes and verification URI
913
913
  */
914
- startDeviceAuthorizationFlow(requesterApplicationId: string, targetApplicationId: string): Promise<DeviceAuthorizationResponse>;
914
+ startDeviceAuthorizationFlow(requesterApplicationId: string, targetApplicationId?: string): Promise<DeviceAuthorizationResponse>;
915
915
  /**
916
916
  * Retrieves the context for a pending device authorization request.
917
917
  *
@@ -3423,7 +3423,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3423
3423
  data: StartAuthorizationFlowResponse;
3424
3424
  error: null;
3425
3425
  }>;
3426
- startDeviceAuthorizationFlow: (requesterApplicationId: string, targetApplicationId: string) => Promise<{
3426
+ startDeviceAuthorizationFlow: (requesterApplicationId: string, targetApplicationId?: string) => Promise<{
3427
3427
  data: null;
3428
3428
  error: {
3429
3429
  message?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -908,10 +908,10 @@ declare class ApplicationService {
908
908
  * on the verification URI to authorize the device.
909
909
  *
910
910
  * @param requesterApplicationId - The application requesting authorization
911
- * @param targetApplicationId - The target application to gain access to
911
+ * @param targetApplicationId - The target application to gain access to. Omit it to sign the user in to the requester application itself.
912
912
  * @returns Device authorization details including codes and verification URI
913
913
  */
914
- startDeviceAuthorizationFlow(requesterApplicationId: string, targetApplicationId: string): Promise<DeviceAuthorizationResponse>;
914
+ startDeviceAuthorizationFlow(requesterApplicationId: string, targetApplicationId?: string): Promise<DeviceAuthorizationResponse>;
915
915
  /**
916
916
  * Retrieves the context for a pending device authorization request.
917
917
  *
@@ -3423,7 +3423,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3423
3423
  data: StartAuthorizationFlowResponse;
3424
3424
  error: null;
3425
3425
  }>;
3426
- startDeviceAuthorizationFlow: (requesterApplicationId: string, targetApplicationId: string) => Promise<{
3426
+ startDeviceAuthorizationFlow: (requesterApplicationId: string, targetApplicationId?: string) => Promise<{
3427
3427
  data: null;
3428
3428
  error: {
3429
3429
  message?: string | undefined;
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
21
21
  return nowInSeconds > expirationTime;
22
22
  }
23
23
 
24
- const version = "2.7.0";
24
+ const version = "2.8.0";
25
25
 
26
26
  function parsedEnumValues(schema) {
27
27
  return Object.fromEntries(
@@ -1538,7 +1538,7 @@ class ApplicationService {
1538
1538
  * on the verification URI to authorize the device.
1539
1539
  *
1540
1540
  * @param requesterApplicationId - The application requesting authorization
1541
- * @param targetApplicationId - The target application to gain access to
1541
+ * @param targetApplicationId - The target application to gain access to. Omit it to sign the user in to the requester application itself.
1542
1542
  * @returns Device authorization details including codes and verification URI
1543
1543
  */
1544
1544
  async startDeviceAuthorizationFlow(requesterApplicationId, targetApplicationId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {