@snokam/auth 3.2.2 → 3.3.0

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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.3.0](https://github.com/snokam/components/compare/@snokam/auth@3.2.2...@snokam/auth@3.3.0) (2026-10-03)
7
+
8
+ ### Features
9
+
10
+ - **pages:** blobs on every centred-box page, readable consent card, full integration names ([#2566](https://github.com/snokam/components/issues/2566)) ([6076941](https://github.com/snokam/components/commit/60769412cc3a1cfd2d239d2377d71a622fb99f94))
11
+
6
12
  ## [3.2.2](https://github.com/snokam/components/compare/@snokam/auth@3.2.1...@snokam/auth@3.2.2) (2026-10-02)
7
13
 
8
14
  **Note:** Version bump only for package @snokam/auth
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snokam/auth",
3
3
  "description": "Snøkam auth components",
4
- "version": "3.2.2",
4
+ "version": "3.3.0",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
7
7
  "files": [
@@ -25,11 +25,11 @@
25
25
  "@snokam/employees-client": "^1.3.0",
26
26
  "next-auth": "4.24.15",
27
27
  "path-to-regexp": "^8.4.2",
28
+ "@snokam/identity": "1.1.0",
28
29
  "@snokam/platform-client": "3.2.0",
29
30
  "@snokam/react-query": "1.1.0",
30
- "@snokam/ui": "2.0.3",
31
31
  "@snokam/tenant": "2.1.4",
32
- "@snokam/identity": "1.1.0"
32
+ "@snokam/ui": "2.1.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "next": "16.3.3",
@@ -2,12 +2,11 @@
2
2
 
3
3
  import { ReactNode } from "react";
4
4
  import Styled from "./styled";
5
- import { Layout } from "@snokam/ui";
6
- import { TransitionType } from "@snokam/ui/layout";
5
+ import { Alert, Avatar } from "@snokam/ui";
6
+ import { SystemPage } from "@snokam/ui/system-page";
7
+ import { ThemeScope } from "@snokam/ui/theme";
7
8
  import { useAuth } from "../../hooks";
8
9
  import { useOptionalConfig } from "@snokam/tenant";
9
- import Button from "@mui/material/Button";
10
- import { Avatar, Alert } from "@mui/material";
11
10
 
12
11
  export interface ErrorPageProps {
13
12
  message?: ReactNode;
@@ -28,62 +27,51 @@ export const Error = ({
28
27
  const isProd = config?.NEXT_PUBLIC_ENVIRONMENT === "p";
29
28
 
30
29
  return (
31
- <Styled.Container
32
- transitions={{
33
- bottom: {
34
- type: TransitionType.Wave,
35
- },
36
- }}
37
- >
38
- <Layout.Content>
39
- <Styled.Section>
40
- <Styled.Wrapper>
41
- <Styled.Heading>{heading ?? "Oops! Noe gikk galt."}</Styled.Heading>
42
- <Styled.Illustration
43
- src="https://ressurser.snokam.no/figures/snowman.svg"
44
- alt="Feil illustrasjon"
45
- />
46
- <Styled.Description>
47
- {message ?? (
48
- <>
49
- En uventet feil har oppstått.
50
- <br />
51
- Prøv igjen, eller logg inn på nytt.
52
- </>
53
- )}
54
- </Styled.Description>
55
- {session && session.user && (
56
- <Styled.User>
57
- <Avatar src={session.user.image ?? undefined} />
58
- Logget inn som: {session.user.name}
59
- <br />({session.user.email})
60
- </Styled.User>
61
- )}
62
- {!isProd && (
63
- <Alert severity="warning">
64
- Du er i test! Husk at det kun er mulig å logge inn <br />
65
- med en av våre testbrukere som du finner i 1Password.
66
- </Alert>
67
- )}
68
- {action}
69
- {!hideRetryButton && (
70
- <Button
71
- sx={{ mt: 3 }}
72
- color="secondary"
73
- variant={action ? "outlined" : "contained"}
74
- onClick={() => {
75
- signOut({
76
- callbackUrl: "/auth/login?callbackUrl=/&prompt=login",
77
- });
78
- }}
79
- >
80
- Logg inn på nytt
81
- </Button>
82
- )}
83
- </Styled.Wrapper>
84
- </Styled.Section>
85
- </Layout.Content>
86
- </Styled.Container>
30
+ <SystemPage>
31
+ <ThemeScope theme="light" as={Styled.Wrapper}>
32
+ <Styled.Heading>{heading ?? "Oops! Noe gikk galt."}</Styled.Heading>
33
+ <Styled.Illustration
34
+ src="https://ressurser.snokam.no/figures/snowman.svg"
35
+ alt="Feil illustrasjon"
36
+ />
37
+ <Styled.Description>
38
+ {message ?? (
39
+ <>
40
+ En uventet feil har oppstått.
41
+ <br />
42
+ Prøv igjen, eller logg inn på nytt.
43
+ </>
44
+ )}
45
+ </Styled.Description>
46
+ {session && session.user && (
47
+ <Styled.User>
48
+ <Avatar src={session.user.image ?? undefined} />
49
+ Logget inn som: {session.user.name}
50
+ <br />({session.user.email})
51
+ </Styled.User>
52
+ )}
53
+ {!isProd && (
54
+ <Alert severity="warning">
55
+ Du er i test! Husk at det kun er mulig å logge inn <br />
56
+ med en av våre testbrukere som du finner i 1Password.
57
+ </Alert>
58
+ )}
59
+ {action}
60
+ {!hideRetryButton && (
61
+ <Styled.RetryButton
62
+ color="primary"
63
+ variant={action ? "outlined" : "contained"}
64
+ onClick={() => {
65
+ signOut({
66
+ callbackUrl: "/auth/login?callbackUrl=/&prompt=login",
67
+ });
68
+ }}
69
+ >
70
+ Logg inn på nytt
71
+ </Styled.RetryButton>
72
+ )}
73
+ </ThemeScope>
74
+ </SystemPage>
87
75
  );
88
76
  };
89
77
 
@@ -1,10 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
- import Layout from "@snokam/ui/layout";
3
-
4
- const Container = styled(Layout.Container)`
5
- flex: 1;
6
- justify-content: center;
7
- `;
2
+ import { Button } from "@snokam/ui";
8
3
 
9
4
  const Wrapper = styled.div`
10
5
  display: flex;
@@ -17,6 +12,7 @@ const Wrapper = styled.div`
17
12
  background-color: var(--color-dark-green);
18
13
  border-radius: 1rem;
19
14
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
15
+ color: var(--color-primary);
20
16
  `;
21
17
 
22
18
  const Heading = styled.h1`
@@ -31,13 +27,6 @@ const Illustration = styled.img`
31
27
  height: auto;
32
28
  `;
33
29
 
34
- const Section = styled(Layout.Section)`
35
- display: flex;
36
- justify-content: center;
37
- align-items: center;
38
- color: var(--color-light-blue);
39
- `;
40
-
41
30
  const Description = styled.div`
42
31
  display: flex;
43
32
  font-size: 1.15rem;
@@ -52,12 +41,15 @@ const User = styled.div`
52
41
  gap: 1rem;
53
42
  `;
54
43
 
44
+ const RetryButton = styled(Button)`
45
+ margin-top: 24px;
46
+ `;
47
+
55
48
  export default {
56
- Container,
57
49
  Wrapper,
58
50
  Heading,
59
51
  Illustration,
60
52
  Description,
61
- Section,
62
53
  User,
54
+ RetryButton,
63
55
  };