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:
@@ -144,7 +144,9 @@ export default class AuthStore {
|
||||
@action
|
||||
fetch = async () => {
|
||||
try {
|
||||
const res = await client.post("/auth.info");
|
||||
const res = await client.post("/auth.info", undefined, {
|
||||
credentials: "same-origin",
|
||||
});
|
||||
invariant(res?.data, "Auth not available");
|
||||
runInAction("AuthStore#fetch", () => {
|
||||
this.addPolicies(res.policies);
|
||||
|
||||
Reference in New Issue
Block a user