@authhero/react-admin 0.12.0 → 0.13.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/authProvider.ts +20 -0
- package/src/components/settings/edit.tsx +5 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/authProvider.ts
CHANGED
|
@@ -751,6 +751,16 @@ export const createOrganizationHttpClient = (organizationId: string) => {
|
|
|
751
751
|
})
|
|
752
752
|
.then((token) => {
|
|
753
753
|
const headersObj = new Headers();
|
|
754
|
+
// Merge any headers passed in options
|
|
755
|
+
if (options.headers) {
|
|
756
|
+
const incomingHeaders =
|
|
757
|
+
options.headers instanceof Headers
|
|
758
|
+
? options.headers
|
|
759
|
+
: new Headers(options.headers as HeadersInit);
|
|
760
|
+
incomingHeaders.forEach((value, key) => {
|
|
761
|
+
headersObj.set(key, value);
|
|
762
|
+
});
|
|
763
|
+
}
|
|
754
764
|
headersObj.set("Authorization", `Bearer ${token}`);
|
|
755
765
|
const method = (options.method || "GET").toUpperCase();
|
|
756
766
|
if (method === "POST" || method === "PATCH") {
|
|
@@ -843,6 +853,16 @@ export const createOrganizationHttpClient = (organizationId: string) => {
|
|
|
843
853
|
})
|
|
844
854
|
.then((token) => {
|
|
845
855
|
const headersObj = new Headers();
|
|
856
|
+
// Merge any headers passed in options
|
|
857
|
+
if (options.headers) {
|
|
858
|
+
const incomingHeaders =
|
|
859
|
+
options.headers instanceof Headers
|
|
860
|
+
? options.headers
|
|
861
|
+
: new Headers(options.headers as HeadersInit);
|
|
862
|
+
incomingHeaders.forEach((value, key) => {
|
|
863
|
+
headersObj.set(key, value);
|
|
864
|
+
});
|
|
865
|
+
}
|
|
846
866
|
headersObj.set("Authorization", `Bearer ${token}`);
|
|
847
867
|
const method = (options.method || "GET").toUpperCase();
|
|
848
868
|
if (method === "POST" || method === "PATCH") {
|
|
@@ -126,6 +126,11 @@ export function SettingsEdit() {
|
|
|
126
126
|
|
|
127
127
|
<TabbedForm.Tab label="Feature Flags">
|
|
128
128
|
<Stack spacing={2}>
|
|
129
|
+
<BooleanInput
|
|
130
|
+
source="allow_organization_name_in_authentication_api"
|
|
131
|
+
label="Allow Organization Name in Authentication API"
|
|
132
|
+
helperText="Allow using organization names (instead of IDs) in the /authorize endpoint and include org_name claim in tokens"
|
|
133
|
+
/>
|
|
129
134
|
<BooleanInput
|
|
130
135
|
source="flags.allow_legacy_delegation_grant_types"
|
|
131
136
|
label="Allow Legacy Delegation Grant Types"
|