Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/floppy-pandas-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@asgardeo/react': patch
---

Refactor AsgardeoReactClient initialization to fix the type issue
5 changes: 4 additions & 1 deletion packages/nextjs/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -36,6 +36,9 @@ module.exports = {
project: [path.resolve(__dirname, 'tsconfig.eslint.json')],
},
plugins: ['@wso2'],
rules: {
'@typescript-eslint/return-await': 'off',
},
settings: {
'import/resolver': {
node: {
Expand Down
15 changes: 7 additions & 8 deletions packages/react/src/AsgardeoReactClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,13 @@ class AsgardeoReactClient<T extends AsgardeoReactConfig = AsgardeoReactConfig> e
}

return this.withLoading(async () => {
this.initializeConfig = {
...config,
organizationHandle: resolvedOrganizationHandle,
periodicTokenRefresh: config?.tokenLifecycle?.refreshToken?.autoRefresh
?? (config as any)?.periodicTokenRefresh,
};

return this.asgardeo.init(this.initializeConfig as any);
this.initializeConfig = {...config, organizationHandle: resolvedOrganizationHandle};

return this.asgardeo.init({
...this.initializeConfig,
periodicTokenRefresh:
config?.tokenLifecycle?.refreshToken?.autoRefresh ?? (config as any)?.periodicTokenRefresh,
} as any);
});
}

Expand Down
Loading