@asgardeo/auth-spa 3.0.7 → 3.1.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.
Files changed (44) hide show
  1. package/README.md +10 -1
  2. package/dist/asgardeo-spa.production.esm.js +37 -14
  3. package/dist/asgardeo-spa.production.esm.js.map +1 -1
  4. package/dist/asgardeo-spa.production.js +32 -9
  5. package/dist/asgardeo-spa.production.js.map +1 -1
  6. package/dist/asgardeo-spa.production.min.js +1 -1
  7. package/dist/asgardeo-spa.production.min.js.map +1 -1
  8. package/dist/polyfilled/asgardeo-spa.production.esm.js +32 -9
  9. package/dist/polyfilled/asgardeo-spa.production.esm.js.map +1 -1
  10. package/dist/polyfilled/asgardeo-spa.production.js +32 -9
  11. package/dist/polyfilled/asgardeo-spa.production.js.map +1 -1
  12. package/dist/polyfilled/asgardeo-spa.production.min.js +1 -1
  13. package/dist/polyfilled/asgardeo-spa.production.min.js.map +1 -1
  14. package/dist/src/client.d.ts +6 -2
  15. package/dist/src/client.d.ts.map +1 -1
  16. package/dist/src/client.js +4 -4
  17. package/dist/src/client.js.map +1 -1
  18. package/dist/src/clients/main-thread-client.d.ts.map +1 -1
  19. package/dist/src/clients/main-thread-client.js +16 -8
  20. package/dist/src/clients/main-thread-client.js.map +1 -1
  21. package/dist/src/clients/web-worker-client.d.ts.map +1 -1
  22. package/dist/src/clients/web-worker-client.js +7 -6
  23. package/dist/src/clients/web-worker-client.js.map +1 -1
  24. package/dist/src/constants/storage.d.ts +1 -0
  25. package/dist/src/constants/storage.d.ts.map +1 -1
  26. package/dist/src/constants/storage.js +1 -0
  27. package/dist/src/constants/storage.js.map +1 -1
  28. package/dist/src/helpers/authentication-helper.d.ts +8 -2
  29. package/dist/src/helpers/authentication-helper.d.ts.map +1 -1
  30. package/dist/src/helpers/authentication-helper.js +4 -4
  31. package/dist/src/helpers/authentication-helper.js.map +1 -1
  32. package/dist/src/models/client.d.ts +12 -4
  33. package/dist/src/models/client.d.ts.map +1 -1
  34. package/dist/src/models/message.d.ts +3 -0
  35. package/dist/src/models/message.d.ts.map +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +2 -2
  38. package/src/client.ts +28 -22
  39. package/src/clients/main-thread-client.ts +31 -8
  40. package/src/clients/web-worker-client.ts +16 -6
  41. package/src/constants/storage.ts +2 -0
  42. package/src/helpers/authentication-helper.ts +11 -5
  43. package/src/models/client.ts +13 -4
  44. package/src/models/message.ts +3 -0
package/README.md CHANGED
@@ -334,7 +334,7 @@ auth.getBasicUserInfo().then((response) => {
334
334
  ### signIn
335
335
 
336
336
  ```typescript
337
- signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string);
337
+ signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string, tokenRequestConfig?: { params: Record<string, unknown> });
338
338
  ```
339
339
 
340
340
  #### Arguments
@@ -346,6 +346,15 @@ signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string)
346
346
  The `signIn` method can be passed the authorization code as an argument, which will be used to obtain the token during the token-request phase of the method. This allows developers to use different response modes such as `form_post`. To learn more about the `form_post` method refer to the [Using the `form_post` response mode](#Using-the-form_post-response-mode) section. If you're using the `query` method, then the `signIn` method automatically obtains the authorization code from the URL.
347
347
  3. sessionState?: `string` (optional)
348
348
  The `signIn` method can be passed the session state as an argument, which will be used to obtain the token during the token-request phase of the method. This allows developers to use different response modes such as `form_post`. To learn more about the `form_post` method refer to the [Using the `form_post` response mode](#Using-the-form_post-response-mode) section. If you're using the `query` method, then the `signIn` method automatically obtains the session state from the URL.
349
+ 4. tokenRequestConfig?: `object` (optional)
350
+ An optional configuration object that allows you to augment the token request.
351
+ - `params` (Mandatory): Key-value pairs to be sent as additional parameters in the token request payload.
352
+
353
+ ```TypeScript
354
+ tokenRequestConfig: {
355
+ params: Record<string, unknown>
356
+ }
357
+ ```
349
358
 
350
359
  #### Description
351
360