> renders session details 1`] = `
+
+
+ Last Active
+
+
+
+ Active Sat, 29 Jul 2023, 03:35
+
+
+
+
+
+ IP Address
+
+
+
+ 1.2.3.4
+
+
+
@@ -105,7 +139,7 @@ exports[` > renders session details 1`] = `
-
+
openid
@@ -115,7 +149,7 @@ exports[` > renders session details 1`] = `
urn:matrix:org.matrix.msc2967.client:device:abcd1234
-
+
diff --git a/frontend/src/components/__snapshots__/CompatSession.test.tsx.snap b/frontend/src/components/__snapshots__/CompatSession.test.tsx.snap
index 0e579d48..e6d0b52f 100644
--- a/frontend/src/components/__snapshots__/CompatSession.test.tsx.snap
+++ b/frontend/src/components/__snapshots__/CompatSession.test.tsx.snap
@@ -37,6 +37,11 @@ exports[` > renders a finished session 1`] = `
Thu, 29 Jun 2023, 03:35
+
+ 1.2.3.4
+
@@ -76,6 +81,11 @@ exports[` > renders an active session 1`] = `
Thu, 29 Jun 2023, 03:35
+
+ 1.2.3.4
+
diff --git a/frontend/src/components/__snapshots__/OAuth2Session.test.tsx.snap b/frontend/src/components/__snapshots__/OAuth2Session.test.tsx.snap
index 233e9bcd..ec2a1909 100644
--- a/frontend/src/components/__snapshots__/OAuth2Session.test.tsx.snap
+++ b/frontend/src/components/__snapshots__/OAuth2Session.test.tsx.snap
@@ -37,6 +37,11 @@ exports[` > renders a finished session 1`] = `
Thu, 29 Jun 2023, 03:35
+
+ 1.2.3.4
+
@@ -76,6 +81,11 @@ exports[` > renders an active session 1`] = `
Thu, 29 Jun 2023, 03:35
+
+ 1.2.3.4
+
diff --git a/frontend/src/gql/gql.ts b/frontend/src/gql/gql.ts
index 7ec36255..9a127650 100644
--- a/frontend/src/gql/gql.ts
+++ b/frontend/src/gql/gql.ts
@@ -17,7 +17,7 @@ const documents = {
types.CurrentViewerQueryDocument,
"\n query CurrentViewerSessionQuery {\n viewerSession {\n __typename\n ... on BrowserSession {\n id\n }\n\n ... on Anonymous {\n id\n }\n }\n }\n":
types.CurrentViewerSessionQueryDocument,
- "\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n }\n":
+ "\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n }\n":
types.BrowserSession_SessionFragmentDoc,
"\n mutation EndBrowserSession($id: ID!) {\n endBrowserSession(input: { browserSessionId: $id }) {\n status\n browserSession {\n id\n ...BrowserSession_session\n }\n }\n }\n":
types.EndBrowserSessionDocument,
@@ -25,15 +25,21 @@ const documents = {
types.BrowserSessionListDocument,
"\n fragment OAuth2Client_detail on Oauth2Client {\n id\n clientId\n clientName\n clientUri\n logoUri\n tosUri\n policyUri\n redirectUris\n }\n":
types.OAuth2Client_DetailFragmentDoc,
- "\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n ssoLogin {\n id\n redirectUri\n }\n }\n":
+ "\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n":
types.CompatSession_SessionFragmentDoc,
"\n mutation EndCompatSession($id: ID!) {\n endCompatSession(input: { compatSessionId: $id }) {\n status\n compatSession {\n id\n finishedAt\n }\n }\n }\n":
types.EndCompatSessionDocument,
- "\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n":
+ "\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n logoUri\n }\n }\n":
types.OAuth2Session_SessionFragmentDoc,
"\n mutation EndOAuth2Session($id: ID!) {\n endOauth2Session(input: { oauth2SessionId: $id }) {\n status\n oauth2Session {\n id\n ...OAuth2Session_session\n }\n }\n }\n":
types.EndOAuth2SessionDocument,
- "\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_session\n ...OAuth2Session_session\n }\n }\n":
+ "\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n":
+ types.BrowserSession_DetailFragmentDoc,
+ "\n fragment CompatSession_detail on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n":
+ types.CompatSession_DetailFragmentDoc,
+ "\n fragment OAuth2Session_detail on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n":
+ types.OAuth2Session_DetailFragmentDoc,
+ "\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_detail\n ...OAuth2Session_detail\n }\n }\n":
types.SessionQueryDocument,
"\n fragment UnverifiedEmailAlert on User {\n id\n unverifiedEmails: emails(first: 0, state: PENDING) {\n totalCount\n }\n }\n":
types.UnverifiedEmailAlertFragmentDoc,
@@ -63,8 +69,6 @@ const documents = {
types.VerifyEmailDocument,
"\n mutation ResendVerificationEmail($id: ID!) {\n sendVerificationEmail(input: { userEmailId: $id }) {\n status\n\n user {\n id\n primaryEmail {\n id\n }\n }\n\n email {\n id\n ...UserEmail_email\n }\n }\n }\n":
types.ResendVerificationEmailDocument,
- "\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n":
- types.BrowserSession_DetailFragmentDoc,
"\n query BrowserSessionQuery($id: ID!) {\n browserSession(id: $id) {\n id\n ...BrowserSession_detail\n }\n }\n":
types.BrowserSessionQueryDocument,
"\n query OAuth2ClientQuery($id: ID!) {\n oauth2Client(id: $id) {\n ...OAuth2Client_detail\n }\n }\n":
@@ -105,8 +109,8 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: "\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n }\n",
-): (typeof documents)["\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n }\n"];
+ source: "\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n }\n",
+): (typeof documents)["\n fragment BrowserSession_session on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -129,8 +133,8 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: "\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n ssoLogin {\n id\n redirectUri\n }\n }\n",
-): (typeof documents)["\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n ssoLogin {\n id\n redirectUri\n }\n }\n"];
+ source: "\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n",
+): (typeof documents)["\n fragment CompatSession_session on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -141,8 +145,8 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: "\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n",
-): (typeof documents)["\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n"];
+ source: "\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n logoUri\n }\n }\n",
+): (typeof documents)["\n fragment OAuth2Session_session on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n logoUri\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -153,8 +157,26 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: "\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_session\n ...OAuth2Session_session\n }\n }\n",
-): (typeof documents)["\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_session\n ...OAuth2Session_session\n }\n }\n"];
+ source: "\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n",
+): (typeof documents)["\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastActiveIp\n lastActiveAt\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n"];
+/**
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function graphql(
+ source: "\n fragment CompatSession_detail on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n",
+): (typeof documents)["\n fragment CompatSession_detail on CompatSession {\n id\n createdAt\n deviceId\n finishedAt\n lastActiveIp\n lastActiveAt\n ssoLogin {\n id\n redirectUri\n }\n }\n"];
+/**
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function graphql(
+ source: "\n fragment OAuth2Session_detail on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n",
+): (typeof documents)["\n fragment OAuth2Session_detail on Oauth2Session {\n id\n scope\n createdAt\n finishedAt\n lastActiveIp\n lastActiveAt\n client {\n id\n clientId\n clientName\n clientUri\n logoUri\n }\n }\n"];
+/**
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function graphql(
+ source: "\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_detail\n ...OAuth2Session_detail\n }\n }\n",
+): (typeof documents)["\n query SessionQuery($userId: ID!, $deviceId: String!) {\n session(userId: $userId, deviceId: $deviceId) {\n __typename\n ...CompatSession_detail\n ...OAuth2Session_detail\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -239,12 +261,6 @@ export function graphql(
export function graphql(
source: "\n mutation ResendVerificationEmail($id: ID!) {\n sendVerificationEmail(input: { userEmailId: $id }) {\n status\n\n user {\n id\n primaryEmail {\n id\n }\n }\n\n email {\n id\n ...UserEmail_email\n }\n }\n }\n",
): (typeof documents)["\n mutation ResendVerificationEmail($id: ID!) {\n sendVerificationEmail(input: { userEmailId: $id }) {\n status\n\n user {\n id\n primaryEmail {\n id\n }\n }\n\n email {\n id\n ...UserEmail_email\n }\n }\n }\n"];
-/**
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
- */
-export function graphql(
- source: "\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n",
-): (typeof documents)["\n fragment BrowserSession_detail on BrowserSession {\n id\n createdAt\n finishedAt\n userAgent\n lastAuthentication {\n id\n createdAt\n }\n user {\n id\n username\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts
index 61bf77d9..3e733ba4 100644
--- a/frontend/src/gql/graphql.ts
+++ b/frontend/src/gql/graphql.ts
@@ -32,9 +32,9 @@ export type Scalars = {
*
* The input/output is a string in RFC3339 format.
*/
- DateTime: { input: any; output: any };
+ DateTime: { input: string; output: string };
/** URL is a String implementing the [URL Standard](http://url.spec.whatwg.org/) */
- Url: { input: any; output: any };
+ Url: { input: string; output: string };
};
/** The input for the `addEmail` mutation */
@@ -1083,13 +1083,15 @@ export type CurrentViewerSessionQueryQuery = {
export type BrowserSession_SessionFragment = {
__typename?: "BrowserSession";
id: string;
- createdAt: any;
- finishedAt?: any | null;
+ createdAt: string;
+ finishedAt?: string | null;
userAgent?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
lastAuthentication?: {
__typename?: "Authentication";
id: string;
- createdAt: any;
+ createdAt: string;
} | null;
} & { " $fragmentName"?: "BrowserSession_SessionFragment" };
@@ -1154,23 +1156,25 @@ export type OAuth2Client_DetailFragment = {
id: string;
clientId: string;
clientName?: string | null;
- clientUri?: any | null;
- logoUri?: any | null;
- tosUri?: any | null;
- policyUri?: any | null;
- redirectUris: Array;
+ clientUri?: string | null;
+ logoUri?: string | null;
+ tosUri?: string | null;
+ policyUri?: string | null;
+ redirectUris: Array;
} & { " $fragmentName"?: "OAuth2Client_DetailFragment" };
export type CompatSession_SessionFragment = {
__typename?: "CompatSession";
id: string;
- createdAt: any;
+ createdAt: string;
deviceId: string;
- finishedAt?: any | null;
+ finishedAt?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
ssoLogin?: {
__typename?: "CompatSsoLogin";
id: string;
- redirectUri: any;
+ redirectUri: string;
} | null;
} & { " $fragmentName"?: "CompatSession_SessionFragment" };
@@ -1186,7 +1190,7 @@ export type EndCompatSessionMutation = {
compatSession?: {
__typename?: "CompatSession";
id: string;
- finishedAt?: any | null;
+ finishedAt?: string | null;
} | null;
};
};
@@ -1195,15 +1199,16 @@ export type OAuth2Session_SessionFragment = {
__typename?: "Oauth2Session";
id: string;
scope: string;
- createdAt: any;
- finishedAt?: any | null;
+ createdAt: string;
+ finishedAt?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
client: {
__typename?: "Oauth2Client";
id: string;
clientId: string;
clientName?: string | null;
- clientUri?: any | null;
- logoUri?: any | null;
+ logoUri?: string | null;
};
} & { " $fragmentName"?: "OAuth2Session_SessionFragment" };
@@ -1226,6 +1231,55 @@ export type EndOAuth2SessionMutation = {
};
};
+export type BrowserSession_DetailFragment = {
+ __typename?: "BrowserSession";
+ id: string;
+ createdAt: string;
+ finishedAt?: string | null;
+ userAgent?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
+ lastAuthentication?: {
+ __typename?: "Authentication";
+ id: string;
+ createdAt: string;
+ } | null;
+ user: { __typename?: "User"; id: string; username: string };
+} & { " $fragmentName"?: "BrowserSession_DetailFragment" };
+
+export type CompatSession_DetailFragment = {
+ __typename?: "CompatSession";
+ id: string;
+ createdAt: string;
+ deviceId: string;
+ finishedAt?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
+ ssoLogin?: {
+ __typename?: "CompatSsoLogin";
+ id: string;
+ redirectUri: string;
+ } | null;
+} & { " $fragmentName"?: "CompatSession_DetailFragment" };
+
+export type OAuth2Session_DetailFragment = {
+ __typename?: "Oauth2Session";
+ id: string;
+ scope: string;
+ createdAt: string;
+ finishedAt?: string | null;
+ lastActiveIp?: string | null;
+ lastActiveAt?: string | null;
+ client: {
+ __typename?: "Oauth2Client";
+ id: string;
+ clientId: string;
+ clientName?: string | null;
+ clientUri?: string | null;
+ logoUri?: string | null;
+ };
+} & { " $fragmentName"?: "OAuth2Session_DetailFragment" };
+
export type SessionQueryQueryVariables = Exact<{
userId: Scalars["ID"]["input"];
deviceId: Scalars["String"]["input"];
@@ -1236,12 +1290,12 @@ export type SessionQueryQuery = {
session?:
| ({ __typename: "CompatSession" } & {
" $fragmentRefs"?: {
- CompatSession_SessionFragment: CompatSession_SessionFragment;
+ CompatSession_DetailFragment: CompatSession_DetailFragment;
};
})
| ({ __typename: "Oauth2Session" } & {
" $fragmentRefs"?: {
- OAuth2Session_SessionFragment: OAuth2Session_SessionFragment;
+ OAuth2Session_DetailFragment: OAuth2Session_DetailFragment;
};
})
| null;
@@ -1257,7 +1311,7 @@ export type UserEmail_EmailFragment = {
__typename?: "UserEmail";
id: string;
email: string;
- confirmedAt?: any | null;
+ confirmedAt?: string | null;
} & { " $fragmentName"?: "UserEmail_EmailFragment" };
export type RemoveEmailMutationVariables = Exact<{
@@ -1505,20 +1559,6 @@ export type ResendVerificationEmailMutation = {
};
};
-export type BrowserSession_DetailFragment = {
- __typename?: "BrowserSession";
- id: string;
- createdAt: any;
- finishedAt?: any | null;
- userAgent?: string | null;
- lastAuthentication?: {
- __typename?: "Authentication";
- id: string;
- createdAt: any;
- } | null;
- user: { __typename?: "User"; id: string; username: string };
-} & { " $fragmentName"?: "BrowserSession_DetailFragment" };
-
export type BrowserSessionQueryQueryVariables = Exact<{
id: Scalars["ID"]["input"];
}>;
@@ -1596,6 +1636,8 @@ export const BrowserSession_SessionFragmentDoc = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
{ kind: "Field", name: { kind: "Name", value: "userAgent" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "lastAuthentication" },
@@ -1655,6 +1697,8 @@ export const CompatSession_SessionFragmentDoc = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "deviceId" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "ssoLogin" },
@@ -1688,6 +1732,126 @@ export const OAuth2Session_SessionFragmentDoc = {
{ kind: "Field", name: { kind: "Name", value: "scope" } },
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
+ {
+ kind: "Field",
+ name: { kind: "Name", value: "client" },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "clientId" } },
+ { kind: "Field", name: { kind: "Name", value: "clientName" } },
+ { kind: "Field", name: { kind: "Name", value: "logoUri" } },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ ],
+} as unknown as DocumentNode;
+export const BrowserSession_DetailFragmentDoc = {
+ kind: "Document",
+ definitions: [
+ {
+ kind: "FragmentDefinition",
+ name: { kind: "Name", value: "BrowserSession_detail" },
+ typeCondition: {
+ kind: "NamedType",
+ name: { kind: "Name", value: "BrowserSession" },
+ },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
+ { kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "userAgent" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
+ {
+ kind: "Field",
+ name: { kind: "Name", value: "lastAuthentication" },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
+ ],
+ },
+ },
+ {
+ kind: "Field",
+ name: { kind: "Name", value: "user" },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "username" } },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ ],
+} as unknown as DocumentNode;
+export const CompatSession_DetailFragmentDoc = {
+ kind: "Document",
+ definitions: [
+ {
+ kind: "FragmentDefinition",
+ name: { kind: "Name", value: "CompatSession_detail" },
+ typeCondition: {
+ kind: "NamedType",
+ name: { kind: "Name", value: "CompatSession" },
+ },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
+ { kind: "Field", name: { kind: "Name", value: "deviceId" } },
+ { kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
+ {
+ kind: "Field",
+ name: { kind: "Name", value: "ssoLogin" },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "redirectUri" } },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ ],
+} as unknown as DocumentNode;
+export const OAuth2Session_DetailFragmentDoc = {
+ kind: "Document",
+ definitions: [
+ {
+ kind: "FragmentDefinition",
+ name: { kind: "Name", value: "OAuth2Session_detail" },
+ typeCondition: {
+ kind: "NamedType",
+ name: { kind: "Name", value: "Oauth2Session" },
+ },
+ selectionSet: {
+ kind: "SelectionSet",
+ selections: [
+ { kind: "Field", name: { kind: "Name", value: "id" } },
+ { kind: "Field", name: { kind: "Name", value: "scope" } },
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
+ { kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "client" },
@@ -1706,7 +1870,7 @@ export const OAuth2Session_SessionFragmentDoc = {
},
},
],
-} as unknown as DocumentNode;
+} as unknown as DocumentNode;
export const UnverifiedEmailAlertFragmentDoc = {
kind: "Document",
definitions: [
@@ -1831,50 +1995,6 @@ export const UserEmail_VerifyEmailFragmentDoc = {
},
],
} as unknown as DocumentNode;
-export const BrowserSession_DetailFragmentDoc = {
- kind: "Document",
- definitions: [
- {
- kind: "FragmentDefinition",
- name: { kind: "Name", value: "BrowserSession_detail" },
- typeCondition: {
- kind: "NamedType",
- name: { kind: "Name", value: "BrowserSession" },
- },
- selectionSet: {
- kind: "SelectionSet",
- selections: [
- { kind: "Field", name: { kind: "Name", value: "id" } },
- { kind: "Field", name: { kind: "Name", value: "createdAt" } },
- { kind: "Field", name: { kind: "Name", value: "finishedAt" } },
- { kind: "Field", name: { kind: "Name", value: "userAgent" } },
- {
- kind: "Field",
- name: { kind: "Name", value: "lastAuthentication" },
- selectionSet: {
- kind: "SelectionSet",
- selections: [
- { kind: "Field", name: { kind: "Name", value: "id" } },
- { kind: "Field", name: { kind: "Name", value: "createdAt" } },
- ],
- },
- },
- {
- kind: "Field",
- name: { kind: "Name", value: "user" },
- selectionSet: {
- kind: "SelectionSet",
- selections: [
- { kind: "Field", name: { kind: "Name", value: "id" } },
- { kind: "Field", name: { kind: "Name", value: "username" } },
- ],
- },
- },
- ],
- },
- },
- ],
-} as unknown as DocumentNode;
export const CurrentViewerQueryDocument = {
kind: "Document",
definitions: [
@@ -2063,6 +2183,8 @@ export const EndBrowserSessionDocument = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
{ kind: "Field", name: { kind: "Name", value: "userAgent" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "lastAuthentication" },
@@ -2295,6 +2417,8 @@ export const BrowserSessionListDocument = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
{ kind: "Field", name: { kind: "Name", value: "userAgent" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "lastAuthentication" },
@@ -2465,6 +2589,8 @@ export const EndOAuth2SessionDocument = {
{ kind: "Field", name: { kind: "Name", value: "scope" } },
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "client" },
@@ -2474,7 +2600,6 @@ export const EndOAuth2SessionDocument = {
{ kind: "Field", name: { kind: "Name", value: "id" } },
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
{ kind: "Field", name: { kind: "Name", value: "clientName" } },
- { kind: "Field", name: { kind: "Name", value: "clientUri" } },
{ kind: "Field", name: { kind: "Name", value: "logoUri" } },
],
},
@@ -2551,11 +2676,11 @@ export const SessionQueryDocument = {
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
{
kind: "FragmentSpread",
- name: { kind: "Name", value: "CompatSession_session" },
+ name: { kind: "Name", value: "CompatSession_detail" },
},
{
kind: "FragmentSpread",
- name: { kind: "Name", value: "OAuth2Session_session" },
+ name: { kind: "Name", value: "OAuth2Session_detail" },
},
],
},
@@ -2565,7 +2690,7 @@ export const SessionQueryDocument = {
},
{
kind: "FragmentDefinition",
- name: { kind: "Name", value: "CompatSession_session" },
+ name: { kind: "Name", value: "CompatSession_detail" },
typeCondition: {
kind: "NamedType",
name: { kind: "Name", value: "CompatSession" },
@@ -2577,6 +2702,8 @@ export const SessionQueryDocument = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "deviceId" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "ssoLogin" },
@@ -2593,7 +2720,7 @@ export const SessionQueryDocument = {
},
{
kind: "FragmentDefinition",
- name: { kind: "Name", value: "OAuth2Session_session" },
+ name: { kind: "Name", value: "OAuth2Session_detail" },
typeCondition: {
kind: "NamedType",
name: { kind: "Name", value: "Oauth2Session" },
@@ -2605,6 +2732,8 @@ export const SessionQueryDocument = {
{ kind: "Field", name: { kind: "Name", value: "scope" } },
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "client" },
@@ -3563,6 +3692,8 @@ export const AppSessionListDocument = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "deviceId" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "ssoLogin" },
@@ -3591,6 +3722,8 @@ export const AppSessionListDocument = {
{ kind: "Field", name: { kind: "Name", value: "scope" } },
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "client" },
@@ -3600,7 +3733,6 @@ export const AppSessionListDocument = {
{ kind: "Field", name: { kind: "Name", value: "id" } },
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
{ kind: "Field", name: { kind: "Name", value: "clientName" } },
- { kind: "Field", name: { kind: "Name", value: "clientUri" } },
{ kind: "Field", name: { kind: "Name", value: "logoUri" } },
],
},
@@ -3907,6 +4039,8 @@ export const BrowserSessionQueryDocument = {
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
{ kind: "Field", name: { kind: "Name", value: "finishedAt" } },
{ kind: "Field", name: { kind: "Name", value: "userAgent" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveIp" } },
+ { kind: "Field", name: { kind: "Name", value: "lastActiveAt" } },
{
kind: "Field",
name: { kind: "Name", value: "lastAuthentication" },
diff --git a/frontend/src/pages/BrowserSession.tsx b/frontend/src/pages/BrowserSession.tsx
index 893eea2f..fbb85c11 100644
--- a/frontend/src/pages/BrowserSession.tsx
+++ b/frontend/src/pages/BrowserSession.tsx
@@ -24,23 +24,6 @@ import BrowserSessionDetail from "../components/SessionDetail/BrowserSessionDeta
import { graphql } from "../gql";
import { isErr, unwrapErr, unwrapOk } from "../result";
-export const BROWSER_SESSION_DETAIL_FRAGMENT = graphql(/* GraphQL */ `
- fragment BrowserSession_detail on BrowserSession {
- id
- createdAt
- finishedAt
- userAgent
- lastAuthentication {
- id
- createdAt
- }
- user {
- id
- username
- }
- }
-`);
-
const QUERY = graphql(/* GraphQL */ `
query BrowserSessionQuery($id: ID!) {
browserSession(id: $id) {
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 7e589758..c4389c91 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -122,7 +122,7 @@ export default defineConfig((env) => ({
proxy: {
// Routes mostly extracted from crates/router/src/endpoints.rs
"^/(|graphql.*|assets.*|\\.well-known.*|oauth2.*|login.*|logout.*|register.*|reauth.*|add-email.*|verify-email.*|change-password.*|consent.*|_matrix.*|complete-compat-sso.*)$":
- "https://auth-oidc.lab.element.dev",
+ "http://127.0.0.1:8080",
},
},