feat: Add availableTeams to auth.info endpoint (#3981)
* Index emails migration * feat: Add available teams to auth.info endpoint * test * separate presenter * Include data from sessions cookie, include likely logged in state * test * test: Add test for team only in session cookie * Suggested query change in PR feedback
This commit is contained in:
@@ -25,6 +25,7 @@ type Options = {
|
||||
|
||||
type FetchOptions = {
|
||||
download?: boolean;
|
||||
credentials?: "omit" | "same-origin" | "include";
|
||||
headers?: Record<string, string>;
|
||||
};
|
||||
|
||||
@@ -111,7 +112,11 @@ class ApiClient {
|
||||
// not needed for authentication this offers a performance increase.
|
||||
// For self-hosted we include them to support a wide variety of
|
||||
// authenticated proxies, e.g. Pomerium, Cloudflare Access etc.
|
||||
credentials: isCloudHosted ? "omit" : "same-origin",
|
||||
credentials: options.credentials
|
||||
? options.credentials
|
||||
: isCloudHosted
|
||||
? "omit"
|
||||
: "same-origin",
|
||||
cache: "no-cache",
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user