@backstage/plugin-auth 0.1.6-next.1 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @backstage/plugin-auth
2
2
 
3
+ ## 0.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 06294aa: Migrated the ConsentPage UI from Material-UI and `@backstage/core-components` to `@backstage/ui`.
8
+ - aa29b50: New frontend system pages now use the default plugin header together with `HeaderPage` instead of the legacy core page header pattern.
9
+ - Updated dependencies
10
+ - @backstage/ui@0.13.0
11
+ - @backstage/frontend-plugin-api@0.15.0
12
+
3
13
  ## 0.1.6-next.1
4
14
 
5
15
  ### Patch Changes
@@ -1,178 +1,129 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useParams } from 'react-router-dom';
3
- import { makeStyles, Box, Card, CardContent, Typography, Divider, CardActions, Button } from '@material-ui/core';
4
- import { Alert } from '@material-ui/lab';
5
- import CheckCircleIcon from '@material-ui/icons/CheckCircle';
6
- import CancelIcon from '@material-ui/icons/Cancel';
7
- import AppsIcon from '@material-ui/icons/Apps';
8
- import WarningIcon from '@material-ui/icons/Warning';
9
- import { EmptyState, Progress, ResponseErrorPanel, Page, Header, Content } from '@backstage/core-components';
3
+ import { Alert, Card, CardBody, Flex, Text, Box, CardFooter, Button, FullPage, VisuallyHidden, Container } from '@backstage/ui';
4
+ import { RiCheckboxCircleLine, RiCloseCircleLine, RiAppsLine } from '@remixicon/react';
10
5
  import { useConsentSession } from './useConsentSession.esm.js';
11
6
  import { useApi, configApiRef } from '@backstage/frontend-plugin-api';
7
+ import styles from './ConsentPage.module.css.esm.js';
12
8
 
13
- const useStyles = makeStyles((theme) => ({
14
- authCard: {
15
- maxWidth: 600,
16
- margin: "0 auto",
17
- marginTop: theme.spacing(4)
18
- },
19
- appHeader: {
20
- display: "flex",
21
- alignItems: "center",
22
- marginBottom: theme.spacing(2)
23
- },
24
- appIcon: {
25
- marginRight: theme.spacing(2),
26
- fontSize: 40
27
- },
28
- appName: {
29
- fontSize: "1.5rem",
30
- fontWeight: "bold"
31
- },
32
- securityWarning: {
33
- margin: theme.spacing(2, 0)
34
- },
35
- buttonContainer: {
36
- display: "flex",
37
- justifyContent: "space-between",
38
- gap: theme.spacing(2),
39
- padding: theme.spacing(2)
40
- },
41
- callbackUrl: {
42
- fontFamily: "monospace",
43
- backgroundColor: theme.palette.background.default,
44
- padding: theme.spacing(1),
45
- borderRadius: theme.shape.borderRadius,
46
- wordBreak: "break-all",
47
- fontSize: "0.875rem"
48
- },
49
- scopeList: {
50
- backgroundColor: theme.palette.background.default,
51
- borderRadius: theme.shape.borderRadius,
52
- padding: theme.spacing(1)
53
- }
54
- }));
55
- const ConsentPageLayout = ({
56
- title,
57
- children
58
- }) => /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
59
- /* @__PURE__ */ jsx(Header, { title }),
60
- /* @__PURE__ */ jsx(Content, { children })
9
+ const ConsentPageLayout = ({ children }) => /* @__PURE__ */ jsxs(FullPage, { children: [
10
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("h1", { children: "Authorization" }) }),
11
+ /* @__PURE__ */ jsx(Container, { py: "8", children })
61
12
  ] });
62
13
  const ConsentPage = () => {
63
- const classes = useStyles();
64
14
  const { sessionId } = useParams();
65
15
  const { state, handleAction } = useConsentSession({ sessionId });
66
16
  const configApi = useApi(configApiRef);
67
17
  const appTitle = configApi.getOptionalString("app.title") ?? "Backstage";
68
18
  if (!sessionId) {
69
- return /* @__PURE__ */ jsx(ConsentPageLayout, { title: "Authorization Error", children: /* @__PURE__ */ jsx(
70
- EmptyState,
19
+ return /* @__PURE__ */ jsx(ConsentPageLayout, { children: /* @__PURE__ */ jsx(
20
+ Alert,
71
21
  {
72
- missing: "data",
22
+ status: "info",
23
+ icon: true,
73
24
  title: "Invalid Request",
74
25
  description: "The consent request ID is missing or invalid."
75
26
  }
76
27
  ) });
77
28
  }
78
29
  if (state.status === "loading") {
79
- return /* @__PURE__ */ jsx(ConsentPageLayout, { title: "Authorization Request", children: /* @__PURE__ */ jsx(
80
- Box,
30
+ return /* @__PURE__ */ jsx(ConsentPageLayout, { children: /* @__PURE__ */ jsx(Alert, { loading: true, title: "Loading authorization request..." }) });
31
+ }
32
+ if (state.status === "error") {
33
+ return /* @__PURE__ */ jsx(ConsentPageLayout, { children: /* @__PURE__ */ jsx(
34
+ Alert,
81
35
  {
82
- display: "flex",
83
- justifyContent: "center",
84
- alignItems: "center",
85
- minHeight: 300,
86
- children: /* @__PURE__ */ jsx(Progress, {})
36
+ status: "danger",
37
+ icon: true,
38
+ title: "Authorization Error",
39
+ description: state.error
87
40
  }
88
41
  ) });
89
42
  }
90
- if (state.status === "error") {
91
- return /* @__PURE__ */ jsx(ConsentPageLayout, { title: "Authorization Error", children: /* @__PURE__ */ jsx(ResponseErrorPanel, { error: new Error(state.error) }) });
92
- }
93
43
  if (state.status === "completed") {
94
- return /* @__PURE__ */ jsx(ConsentPageLayout, { title: "Authorization Complete", children: /* @__PURE__ */ jsx(Card, { className: classes.authCard, children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Box, { textAlign: "center", children: [
95
- state.action === "approve" ? /* @__PURE__ */ jsx(
96
- CheckCircleIcon,
97
- {
98
- style: { fontSize: 64, color: "green", marginBottom: 16 }
99
- }
100
- ) : /* @__PURE__ */ jsx(
101
- CancelIcon,
102
- {
103
- style: { fontSize: 64, color: "red", marginBottom: 16 }
104
- }
105
- ),
106
- /* @__PURE__ */ jsx(Typography, { variant: "h5", gutterBottom: true, children: state.action === "approve" ? "Authorization Approved" : "Authorization Denied" }),
107
- /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "textSecondary", gutterBottom: true, children: state.action === "approve" ? `You have successfully authorized the application to access your ${appTitle} account.` : `You have denied the application access to your ${appTitle} account.` }),
108
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Redirecting to the application..." })
109
- ] }) }) }) });
44
+ return /* @__PURE__ */ jsx(ConsentPageLayout, { children: /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsxs(
45
+ Flex,
46
+ {
47
+ direction: "column",
48
+ align: "center",
49
+ gap: "2",
50
+ style: { textAlign: "center" },
51
+ children: [
52
+ state.action === "approve" ? /* @__PURE__ */ jsx(
53
+ RiCheckboxCircleLine,
54
+ {
55
+ size: 64,
56
+ className: styles.completedIconSuccess
57
+ }
58
+ ) : /* @__PURE__ */ jsx(
59
+ RiCloseCircleLine,
60
+ {
61
+ size: 64,
62
+ className: styles.completedIconDanger
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx(Text, { as: "h2", variant: "title-small", children: state.action === "approve" ? "Authorization Approved" : "Authorization Denied" }),
66
+ /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: state.action === "approve" ? `You have successfully authorized the application to access your ${appTitle} account.` : `You have denied the application access to your ${appTitle} account.` }),
67
+ /* @__PURE__ */ jsx(Text, { variant: "body-small", color: "secondary", children: "Redirecting to the application..." })
68
+ ]
69
+ }
70
+ ) }) }) });
110
71
  }
111
72
  const session = state.session;
112
73
  const isSubmitting = state.status === "submitting";
113
74
  const appName = session.clientName ?? session.clientId;
114
- return /* @__PURE__ */ jsx(ConsentPageLayout, { title: "Authorization Request", children: /* @__PURE__ */ jsxs(Card, { className: classes.authCard, children: [
115
- /* @__PURE__ */ jsxs(CardContent, { children: [
116
- /* @__PURE__ */ jsxs(Box, { className: classes.appHeader, children: [
117
- /* @__PURE__ */ jsx(AppsIcon, { className: classes.appIcon }),
118
- /* @__PURE__ */ jsxs(Box, { children: [
119
- /* @__PURE__ */ jsx(Typography, { className: classes.appName, children: appName }),
120
- /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
75
+ return /* @__PURE__ */ jsx(ConsentPageLayout, { children: /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
76
+ /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "4", children: [
77
+ /* @__PURE__ */ jsxs(Box, { className: styles.appHeader, children: [
78
+ /* @__PURE__ */ jsx(RiAppsLine, { size: 40, className: styles.appIcon }),
79
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "0.5", children: [
80
+ /* @__PURE__ */ jsx(Text, { as: "span", variant: "title-small", weight: "bold", children: appName }),
81
+ /* @__PURE__ */ jsxs(Text, { variant: "body-small", color: "secondary", children: [
121
82
  "wants to access your ",
122
83
  appTitle,
123
84
  " account"
124
85
  ] })
125
86
  ] })
126
87
  ] }),
127
- /* @__PURE__ */ jsx(Divider, {}),
128
- /* @__PURE__ */ jsxs(
88
+ /* @__PURE__ */ jsx("hr", { className: styles.divider }),
89
+ /* @__PURE__ */ jsx(
129
90
  Alert,
130
91
  {
131
- severity: "warning",
132
- icon: /* @__PURE__ */ jsx(WarningIcon, {}),
133
- className: classes.securityWarning,
134
- children: [
135
- /* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
136
- /* @__PURE__ */ jsx("strong", { children: "Security Notice:" }),
137
- " By authorizing this application, you are granting it access to your ",
138
- appTitle,
139
- " account. The application will receive an access token that allows it to act on your behalf."
140
- ] }),
141
- /* @__PURE__ */ jsxs(Box, { mt: 1, children: [
142
- /* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx("strong", { children: "Callback URL:" }) }),
143
- /* @__PURE__ */ jsx(Box, { className: classes.callbackUrl, children: session.redirectUri })
144
- ] })
145
- ]
92
+ status: "warning",
93
+ icon: true,
94
+ title: "Security Notice",
95
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
96
+ "By authorizing this application, you are granting it access to your ",
97
+ appTitle,
98
+ " account. The application will receive an access token that allows it to act on your behalf.",
99
+ /* @__PURE__ */ jsx("div", { className: styles.callbackUrl, children: session.redirectUri })
100
+ ] })
146
101
  }
147
102
  ),
148
- /* @__PURE__ */ jsx(Box, { mt: 2, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Make sure you trust this application and recognize the callback URL above. Only authorize applications you trust." }) })
149
- ] }),
150
- /* @__PURE__ */ jsxs(CardActions, { className: classes.buttonContainer, children: [
103
+ /* @__PURE__ */ jsx(Text, { variant: "body-small", color: "secondary", children: "Make sure you trust this application and recognize the callback URL above. Only authorize applications you trust." })
104
+ ] }) }),
105
+ /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs(Flex, { justify: "between", gap: "4", children: [
151
106
  /* @__PURE__ */ jsx(
152
107
  Button,
153
108
  {
154
- variant: "outlined",
155
- color: "secondary",
156
- size: "large",
157
- disabled: isSubmitting,
158
- onClick: () => handleAction("reject"),
159
- startIcon: /* @__PURE__ */ jsx(CancelIcon, {}),
109
+ variant: "secondary",
110
+ isDisabled: isSubmitting,
111
+ onPress: () => handleAction("reject"),
112
+ iconStart: /* @__PURE__ */ jsx(RiCloseCircleLine, {}),
160
113
  children: "Cancel"
161
114
  }
162
115
  ),
163
116
  /* @__PURE__ */ jsx(
164
117
  Button,
165
118
  {
166
- variant: "contained",
167
- color: "primary",
168
- size: "large",
169
- disabled: isSubmitting,
170
- onClick: () => handleAction("approve"),
171
- startIcon: /* @__PURE__ */ jsx(CheckCircleIcon, {}),
119
+ variant: "primary",
120
+ isDisabled: isSubmitting,
121
+ onPress: () => handleAction("approve"),
122
+ iconStart: /* @__PURE__ */ jsx(RiCheckboxCircleLine, {}),
172
123
  children: isSubmitting ? "Authorizing..." : "Authorize"
173
124
  }
174
125
  )
175
- ] })
126
+ ] }) })
176
127
  ] }) });
177
128
  };
178
129
 
@@ -1 +1 @@
1
- {"version":3,"file":"ConsentPage.esm.js","sources":["../../../src/components/ConsentPage/ConsentPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useParams } from 'react-router-dom';\n\nimport {\n Box,\n Button,\n Card,\n CardActions,\n CardContent,\n Divider,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport AppsIcon from '@material-ui/icons/Apps';\nimport WarningIcon from '@material-ui/icons/Warning';\nimport {\n Content,\n EmptyState,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { useConsentSession } from './useConsentSession';\nimport { configApiRef, useApi } from '@backstage/frontend-plugin-api';\n\nconst useStyles = makeStyles(theme => ({\n authCard: {\n maxWidth: 600,\n margin: '0 auto',\n marginTop: theme.spacing(4),\n },\n appHeader: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: theme.spacing(2),\n },\n appIcon: {\n marginRight: theme.spacing(2),\n fontSize: 40,\n },\n appName: {\n fontSize: '1.5rem',\n fontWeight: 'bold',\n },\n securityWarning: {\n margin: theme.spacing(2, 0),\n },\n buttonContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n gap: theme.spacing(2),\n padding: theme.spacing(2),\n },\n callbackUrl: {\n fontFamily: 'monospace',\n backgroundColor: theme.palette.background.default,\n padding: theme.spacing(1),\n borderRadius: theme.shape.borderRadius,\n wordBreak: 'break-all',\n fontSize: '0.875rem',\n },\n scopeList: {\n backgroundColor: theme.palette.background.default,\n borderRadius: theme.shape.borderRadius,\n padding: theme.spacing(1),\n },\n}));\n\nconst ConsentPageLayout = ({\n title,\n children,\n}: {\n title: string;\n children: React.ReactNode;\n}) => (\n <Page themeId=\"tool\">\n <Header title={title} />\n <Content>{children}</Content>\n </Page>\n);\n\nexport const ConsentPage = () => {\n const classes = useStyles();\n const { sessionId } = useParams<{ sessionId: string }>();\n const { state, handleAction } = useConsentSession({ sessionId });\n const configApi = useApi(configApiRef);\n const appTitle = configApi.getOptionalString('app.title') ?? 'Backstage';\n\n if (!sessionId) {\n return (\n <ConsentPageLayout title=\"Authorization Error\">\n <EmptyState\n missing=\"data\"\n title=\"Invalid Request\"\n description=\"The consent request ID is missing or invalid.\"\n />\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'loading') {\n return (\n <ConsentPageLayout title=\"Authorization Request\">\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight={300}\n >\n <Progress />\n </Box>\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'error') {\n return (\n <ConsentPageLayout title=\"Authorization Error\">\n <ResponseErrorPanel error={new Error(state.error)} />\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'completed') {\n return (\n <ConsentPageLayout title=\"Authorization Complete\">\n <Card className={classes.authCard}>\n <CardContent>\n <Box textAlign=\"center\">\n {state.action === 'approve' ? (\n <CheckCircleIcon\n style={{ fontSize: 64, color: 'green', marginBottom: 16 }}\n />\n ) : (\n <CancelIcon\n style={{ fontSize: 64, color: 'red', marginBottom: 16 }}\n />\n )}\n <Typography variant=\"h5\" gutterBottom>\n {state.action === 'approve'\n ? 'Authorization Approved'\n : 'Authorization Denied'}\n </Typography>\n <Typography variant=\"body1\" color=\"textSecondary\" gutterBottom>\n {state.action === 'approve'\n ? `You have successfully authorized the application to access your ${appTitle} account.`\n : `You have denied the application access to your ${appTitle} account.`}\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n Redirecting to the application...\n </Typography>\n </Box>\n </CardContent>\n </Card>\n </ConsentPageLayout>\n );\n }\n\n const session = state.session;\n const isSubmitting = state.status === 'submitting';\n const appName = session.clientName ?? session.clientId;\n\n return (\n <ConsentPageLayout title=\"Authorization Request\">\n <Card className={classes.authCard}>\n <CardContent>\n <Box className={classes.appHeader}>\n <AppsIcon className={classes.appIcon} />\n <Box>\n <Typography className={classes.appName}>{appName}</Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n wants to access your {appTitle} account\n </Typography>\n </Box>\n </Box>\n\n <Divider />\n\n <Alert\n severity=\"warning\"\n icon={<WarningIcon />}\n className={classes.securityWarning}\n >\n <Typography variant=\"body2\">\n <strong>Security Notice:</strong> By authorizing this application,\n you are granting it access to your {appTitle} account. The\n application will receive an access token that allows it to act on\n your behalf.\n </Typography>\n <Box mt={1}>\n <Typography variant=\"body2\">\n <strong>Callback URL:</strong>\n </Typography>\n <Box className={classes.callbackUrl}>{session.redirectUri}</Box>\n </Box>\n </Alert>\n\n <Box mt={2}>\n <Typography variant=\"body2\" color=\"textSecondary\">\n Make sure you trust this application and recognize the callback\n URL above. Only authorize applications you trust.\n </Typography>\n </Box>\n </CardContent>\n\n <CardActions className={classes.buttonContainer}>\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n size=\"large\"\n disabled={isSubmitting}\n onClick={() => handleAction('reject')}\n startIcon={<CancelIcon />}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n color=\"primary\"\n size=\"large\"\n disabled={isSubmitting}\n onClick={() => handleAction('approve')}\n startIcon={<CheckCircleIcon />}\n >\n {isSubmitting ? 'Authorizing...' : 'Authorize'}\n </Button>\n </CardActions>\n </Card>\n </ConsentPageLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA2CA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,QAAA,EAAU;AAAA,IACR,QAAA,EAAU,GAAA;AAAA,IACV,MAAA,EAAQ,QAAA;AAAA,IACR,SAAA,EAAW,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,GAC5B;AAAA,EACA,SAAA,E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A;AAAA;AAAA,OAED;AAAA,sBACA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,WAAA;AAAA,UACR,KAAA,EAAM,SAAA;AAAA,UACN,IAAA,EAAK,OAAA;AAAA,UACL,QAAA,EAAU,YAAA;AAAA,UACV,OAAA,EAAS,MAAM,YAAA,CAAa,SAAS,CAAA;AAAA,UACrC,SAAA,sBAAY,eAAA,EAAA,EAAgB,CAAA;AAAA,UAE3B,yBAAe,gBAAA,GAAmB;AAAA;AAAA;AACrC,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ConsentPage.esm.js","sources":["../../../src/components/ConsentPage/ConsentPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useParams } from 'react-router-dom';\n\nimport {\n Alert,\n Box,\n Button,\n Card,\n CardBody,\n CardFooter,\n Container,\n Flex,\n FullPage,\n Text,\n VisuallyHidden,\n} from '@backstage/ui';\nimport {\n RiAppsLine,\n RiCheckboxCircleLine,\n RiCloseCircleLine,\n} from '@remixicon/react';\nimport { useConsentSession } from './useConsentSession';\nimport { configApiRef, useApi } from '@backstage/frontend-plugin-api';\nimport styles from './ConsentPage.module.css';\n\nconst ConsentPageLayout = ({ children }: { children: React.ReactNode }) => (\n <FullPage>\n <VisuallyHidden>\n <h1>Authorization</h1>\n </VisuallyHidden>\n <Container py=\"8\">{children}</Container>\n </FullPage>\n);\n\nexport const ConsentPage = () => {\n const { sessionId } = useParams<{ sessionId: string }>();\n const { state, handleAction } = useConsentSession({ sessionId });\n const configApi = useApi(configApiRef);\n const appTitle = configApi.getOptionalString('app.title') ?? 'Backstage';\n\n if (!sessionId) {\n return (\n <ConsentPageLayout>\n <Alert\n status=\"info\"\n icon\n title=\"Invalid Request\"\n description=\"The consent request ID is missing or invalid.\"\n />\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'loading') {\n return (\n <ConsentPageLayout>\n <Alert loading title=\"Loading authorization request...\" />\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'error') {\n return (\n <ConsentPageLayout>\n <Alert\n status=\"danger\"\n icon\n title=\"Authorization Error\"\n description={state.error}\n />\n </ConsentPageLayout>\n );\n }\n\n if (state.status === 'completed') {\n return (\n <ConsentPageLayout>\n <Card className={styles.card}>\n <CardBody>\n <Flex\n direction=\"column\"\n align=\"center\"\n gap=\"2\"\n style={{ textAlign: 'center' }}\n >\n {state.action === 'approve' ? (\n <RiCheckboxCircleLine\n size={64}\n className={styles.completedIconSuccess}\n />\n ) : (\n <RiCloseCircleLine\n size={64}\n className={styles.completedIconDanger}\n />\n )}\n <Text as=\"h2\" variant=\"title-small\">\n {state.action === 'approve'\n ? 'Authorization Approved'\n : 'Authorization Denied'}\n </Text>\n <Text variant=\"body-medium\" color=\"secondary\">\n {state.action === 'approve'\n ? `You have successfully authorized the application to access your ${appTitle} account.`\n : `You have denied the application access to your ${appTitle} account.`}\n </Text>\n <Text variant=\"body-small\" color=\"secondary\">\n Redirecting to the application...\n </Text>\n </Flex>\n </CardBody>\n </Card>\n </ConsentPageLayout>\n );\n }\n\n const session = state.session;\n const isSubmitting = state.status === 'submitting';\n const appName = session.clientName ?? session.clientId;\n\n return (\n <ConsentPageLayout>\n <Card className={styles.card}>\n <CardBody>\n <Flex direction=\"column\" gap=\"4\">\n <Box className={styles.appHeader}>\n <RiAppsLine size={40} className={styles.appIcon} />\n <Flex direction=\"column\" gap=\"0.5\">\n <Text as=\"span\" variant=\"title-small\" weight=\"bold\">\n {appName}\n </Text>\n <Text variant=\"body-small\" color=\"secondary\">\n wants to access your {appTitle} account\n </Text>\n </Flex>\n </Box>\n\n <hr className={styles.divider} />\n\n <Alert\n status=\"warning\"\n icon\n title=\"Security Notice\"\n description={\n <>\n By authorizing this application, you are granting it access to\n your {appTitle} account. The application will receive an\n access token that allows it to act on your behalf.\n <div className={styles.callbackUrl}>\n {session.redirectUri}\n </div>\n </>\n }\n />\n\n <Text variant=\"body-small\" color=\"secondary\">\n Make sure you trust this application and recognize the callback\n URL above. Only authorize applications you trust.\n </Text>\n </Flex>\n </CardBody>\n\n <CardFooter>\n <Flex justify=\"between\" gap=\"4\">\n <Button\n variant=\"secondary\"\n isDisabled={isSubmitting}\n onPress={() => handleAction('reject')}\n iconStart={<RiCloseCircleLine />}\n >\n Cancel\n </Button>\n <Button\n variant=\"primary\"\n isDisabled={isSubmitting}\n onPress={() => handleAction('approve')}\n iconStart={<RiCheckboxCircleLine />}\n >\n {isSubmitting ? 'Authorizing...' : 'Authorize'}\n </Button>\n </Flex>\n </CardFooter>\n </Card>\n </ConsentPageLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAuCA,MAAM,oBAAoB,CAAC,EAAE,QAAA,EAAS,0BACnC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,cAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAG,QAAA,EAAA,eAAA,EAAa,CAAA,EACnB,CAAA;AAAA,kBACA,GAAA,CAAC,SAAA,EAAA,EAAU,EAAA,EAAG,GAAA,EAAK,QAAA,EAAS;AAAA,CAAA,EAC9B,CAAA;AAGK,MAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,SAAA,EAAiC;AACvD,EAAA,MAAM,EAAE,KAAA,EAAO,YAAA,KAAiB,iBAAA,CAAkB,EAAE,WAAW,CAAA;AAC/D,EAAA,MAAM,SAAA,GAAY,OAAO,YAAY,CAAA;AACr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;AAAA,KAAA,EACF,CAAA,EACF,CAAA;AAAA,wBAEC,UAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,QAAK,OAAA,EAAQ,SAAA,EAAU,KAAI,GAAA,EAC1B,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,WAAA;AAAA,UACR,UAAA,EAAY,YAAA;AAAA,UACZ,OAAA,EAAS,MAAM,YAAA,CAAa,QAAQ,CAAA;AAAA,UACpC,SAAA,sBAAY,iBAAA,EAAA,EAAkB,CAAA;AAAA,UAC/B,QAAA,EAAA;AAAA;AAAA,OAED;AAAA,sBACA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,SAAA;AAAA,UACR,UAAA,EAAY,YAAA;AAAA,UACZ,OAAA,EAAS,MAAM,YAAA,CAAa,SAAS,CAAA;AAAA,UACrC,SAAA,sBAAY,oBAAA,EAAA,EAAqB,CAAA;AAAA,UAEhC,yBAAe,gBAAA,GAAmB;AAAA;AAAA;AACrC,KAAA,EACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = ".ConsentPage_card__800025e78d {\n max-width: 600px;\n margin: var(--bui-space-8) auto 0;\n}\n\n.ConsentPage_appHeader__800025e78d {\n display: flex;\n align-items: center;\n gap: var(--bui-space-4);\n}\n\n.ConsentPage_appIcon__800025e78d {\n color: var(--bui-fg-secondary);\n}\n\n.ConsentPage_divider__800025e78d {\n border: none;\n border-top: 1px solid var(--bui-border-1);\n margin: 0;\n}\n\n.ConsentPage_callbackUrl__800025e78d {\n font-family: var(--bui-font-monospace);\n background: var(--bui-bg-neutral-2);\n padding: var(--bui-space-2);\n border-radius: var(--bui-radius-2);\n word-break: break-all;\n font-size: var(--bui-font-size-3);\n margin-top: var(--bui-space-2);\n}\n\n.ConsentPage_completedIcon__800025e78d {\n margin-bottom: var(--bui-space-4);\n}\n\n.ConsentPage_completedIconSuccess__800025e78d {\n color: var(--bui-fg-success);\n}\n\n.ConsentPage_completedIconDanger__800025e78d {\n color: var(--bui-fg-danger);\n}\n";
4
+ var styles = {"card":"ConsentPage_card__800025e78d","appHeader":"ConsentPage_appHeader__800025e78d","appIcon":"ConsentPage_appIcon__800025e78d","divider":"ConsentPage_divider__800025e78d","callbackUrl":"ConsentPage_callbackUrl__800025e78d","completedIconSuccess":"ConsentPage_completedIconSuccess__800025e78d ConsentPage_completedIcon__800025e78d","completedIconDanger":"ConsentPage_completedIconDanger__800025e78d ConsentPage_completedIcon__800025e78d"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=ConsentPage.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConsentPage.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ function styleInject(css, ref) {
2
+ if ( ref === void 0 ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as default };
29
+ //# sourceMappingURL=style-inject.es.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;;;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth",
3
- "version": "0.1.6-next.1",
3
+ "version": "0.1.6",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "auth",
@@ -55,20 +55,18 @@
55
55
  "test": "backstage-cli package test"
56
56
  },
57
57
  "dependencies": {
58
- "@backstage/core-components": "0.18.8-next.1",
59
- "@backstage/errors": "1.2.7",
60
- "@backstage/frontend-plugin-api": "0.15.0-next.1",
61
- "@backstage/theme": "0.7.2",
62
- "@material-ui/core": "^4.12.2",
63
- "@material-ui/icons": "^4.9.1",
64
- "@material-ui/lab": "4.0.0-alpha.61",
58
+ "@backstage/errors": "^1.2.7",
59
+ "@backstage/frontend-plugin-api": "^0.15.0",
60
+ "@backstage/theme": "^0.7.2",
61
+ "@backstage/ui": "^0.13.0",
62
+ "@remixicon/react": "^4.6.0",
65
63
  "react-use": "^17.2.4"
66
64
  },
67
65
  "devDependencies": {
68
- "@backstage/cli": "0.36.0-next.2",
69
- "@backstage/dev-utils": "1.1.21-next.1",
70
- "@backstage/frontend-defaults": "0.5.0-next.1",
71
- "@backstage/test-utils": "1.7.16-next.0",
66
+ "@backstage/cli": "^0.36.0",
67
+ "@backstage/dev-utils": "^1.1.21",
68
+ "@backstage/frontend-defaults": "^0.5.0",
69
+ "@backstage/test-utils": "^1.7.16",
72
70
  "@testing-library/jest-dom": "^6.0.0",
73
71
  "@testing-library/react": "^16.0.0",
74
72
  "@testing-library/user-event": "^14.0.0",