fix(auth): org-scoped team tokens and header search order

This commit is contained in:
Ruslan Bakiev
2026-04-21 14:09:51 +07:00
parent e1e6993f35
commit 39712613ae
8 changed files with 157 additions and 76 deletions

View File

@@ -15,8 +15,8 @@ export const useAuth = () => {
* Get access token for a resource.
* Tokens are synced from SSR via useState, auto-refreshes if expired.
*/
const getAccessToken = async (resource: string, _organizationId?: string): Promise<string> => {
return getToken(resource as Parameters<typeof getToken>[0])
const getAccessToken = async (resource: string, organizationId?: string): Promise<string> => {
return getToken(resource as Parameters<typeof getToken>[0], organizationId)
}
const getOrganizationToken = getAccessToken