-
Notifications
You must be signed in to change notification settings - Fork 49
Fix failure of calling authenticated APIs when multiple AsgardeoProvider instances are used #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cd46fd4
a024481
29262a6
2af8495
85452aa
7e9f8d4
868f9e2
f5a6ee0
bcb8b81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@asgardeo/javascript': patch | ||
| '@asgardeo/browser': patch | ||
| '@asgardeo/react': patch | ||
| --- | ||
|
|
||
| Fix failure of calling authenticated APIs when using multiple AuthProvider instances | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,7 +127,7 @@ export class AsgardeoAuthClient<T> { | |
| this.instanceIdValue += 1; | ||
| } | ||
|
|
||
| if (instanceID) { | ||
| if (instanceID !== undefined) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch fixing if (!this.instanceIdValue) {
this.instanceIdValue = 0;
} else {
this.instanceIdValue += 1;
}If if (this.instanceIdValue === undefined || this.instanceIdValue === null) {
this.instanceIdValue = 0;
} else {
this.instanceIdValue += 1;
}
if (instanceID !== undefined) {
this.instanceIdValue = instanceID;
} |
||
| this.instanceIdValue = instanceID; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type of
getInstance()changed fromAsgardeoSPAClient | undefinedtoAsgardeoSPAClient, and new public methods were added (hasInstance,destroyInstance,getInstanceKeys,destroyAllInstances,getInstanceId). This is a public API surface change — should be aminorbump instead ofpatch: