You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Patch user with user_metadata](#patch-user-with-user_metadata)
14
18
-[Get full user profile](#get-full-user-profile)
@@ -171,6 +175,67 @@ auth0.webAuth
171
175
.catch((error) =>console.log(error));
172
176
```
173
177
178
+
### Using Custom Headers
179
+
180
+
You can set custom headers to be included in all requests to the Auth0 API. This can be useful for implementing custom security requirements, logging, or tracking.
181
+
182
+
#### Set global headers during initialization
183
+
184
+
Global headers are included in all requests made by the SDK:
185
+
186
+
```js
187
+
// Set global headers during Auth0 initialization
188
+
constauth0=newAuth0({
189
+
domain:'YOUR_AUTH0_DOMAIN',
190
+
clientId:'YOUR_AUTH0_CLIENT_ID',
191
+
headers: {
192
+
'Accept-Language':'fr-CA',
193
+
'X-Tracking-Id':'user-tracking-id-123'
194
+
}
195
+
});
196
+
```
197
+
198
+
199
+
#### Using custom headers with Auth0Provider component
200
+
201
+
If you're using the hooks-based approach with Auth0Provider, you can provide headers during initialization:
0 commit comments