@asgardeo/react 0.20.0 → 0.21.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/AsgardeoReactClient.d.ts +1 -1
- package/dist/__temp__/api.d.ts +3 -3
- package/dist/__temp__/models.d.ts +2 -2
- package/dist/cjs/index.js +6 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/__temp__/api.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoSPAClient, AuthClientConfig, User, LegacyConfig as Config, IdToken, Hooks,
|
|
18
|
+
import { AsgardeoSPAClient, AuthClientConfig, User, LegacyConfig as Config, IdToken, Hooks, HttpClient, HttpRequestConfig, HttpResponse, OIDCEndpoints, SignInConfig, SPACustomGrantConfig } from '@asgardeo/browser';
|
|
19
19
|
import { AuthStateInterface } from './models';
|
|
20
20
|
declare class AuthAPI {
|
|
21
21
|
static DEFAULT_STATE: AuthStateInterface;
|
|
@@ -133,9 +133,9 @@ declare class AuthAPI {
|
|
|
133
133
|
/**
|
|
134
134
|
* This methods returns the Axios http client.
|
|
135
135
|
*
|
|
136
|
-
* @return {
|
|
136
|
+
* @return {HttpClient} - The Axios HTTP client.
|
|
137
137
|
*/
|
|
138
|
-
getHttpClient(): Promise<
|
|
138
|
+
getHttpClient(): Promise<HttpClient>;
|
|
139
139
|
/**
|
|
140
140
|
* This method decodes a JWT token payload and returns it.
|
|
141
141
|
*
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoAuthException, AuthClientConfig, AuthSPAClientConfig, Config, TokenExchangeRequestConfig, IdToken, Hooks,
|
|
18
|
+
import { AsgardeoAuthException, AuthClientConfig, AuthSPAClientConfig, Config, TokenExchangeRequestConfig, IdToken, Hooks, HttpClient, HttpRequestConfig, HttpResponse, OIDCEndpoints, SignInConfig, User } from '@asgardeo/browser';
|
|
19
19
|
export interface ReactConfig {
|
|
20
20
|
disableAutoSignIn?: boolean;
|
|
21
21
|
/**
|
|
@@ -65,7 +65,7 @@ export interface AuthContextInterface {
|
|
|
65
65
|
getAccessToken(): Promise<string>;
|
|
66
66
|
getDecodedIDPIDToken(): Promise<IdToken>;
|
|
67
67
|
getDecodedIdToken(sessionId?: string): Promise<IdToken>;
|
|
68
|
-
getHttpClient(): Promise<
|
|
68
|
+
getHttpClient(): Promise<HttpClient>;
|
|
69
69
|
getIdToken(): Promise<string>;
|
|
70
70
|
getOpenIDProviderEndpoints(): Promise<OIDCEndpoints>;
|
|
71
71
|
getUser(): Promise<User>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -427,7 +427,7 @@ var _AuthAPI = class _AuthAPI {
|
|
|
427
427
|
/**
|
|
428
428
|
* This methods returns the Axios http client.
|
|
429
429
|
*
|
|
430
|
-
* @return {
|
|
430
|
+
* @return {HttpClient} - The Axios HTTP client.
|
|
431
431
|
*/
|
|
432
432
|
async getHttpClient() {
|
|
433
433
|
return this.client.getHttpClient();
|
|
@@ -748,7 +748,11 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
748
748
|
resolvedOrganizationHandle = (0, import_browser6.deriveOrganizationHandleFromBaseUrl)(config?.baseUrl);
|
|
749
749
|
}
|
|
750
750
|
return this.withLoading(async () => {
|
|
751
|
-
this.initializeConfig = {
|
|
751
|
+
this.initializeConfig = {
|
|
752
|
+
...config,
|
|
753
|
+
organizationHandle: resolvedOrganizationHandle,
|
|
754
|
+
periodicTokenRefresh: config?.tokenLifecycle?.refreshToken?.autoRefresh ?? config?.periodicTokenRefresh
|
|
755
|
+
};
|
|
752
756
|
return this.asgardeo.init(this.initializeConfig);
|
|
753
757
|
});
|
|
754
758
|
}
|