Returns a fetch-compatible function that automatically attaches the
authenticated user's access token as an Authorization: Bearer header.
The returned function has the same signature as the global fetch. Use it
for any request to your own backend that expects a Hiyve access token.
When no user is signed in, the header is omitted and the request is sent
unauthenticated.
The returned function has a stable reference for the lifetime of the
identity session, so it is safe to pass to useEffect / useCallback
dependency arrays.
Returns a
fetch-compatible function that automatically attaches the authenticated user's access token as anAuthorization: Bearerheader.The returned function has the same signature as the global
fetch. Use it for any request to your own backend that expects a Hiyve access token. When no user is signed in, the header is omitted and the request is sent unauthenticated.The returned function has a stable reference for the lifetime of the identity session, so it is safe to pass to
useEffect/useCallbackdependency arrays.