Skip to content

Commit 9a174eb

Browse files
update messages in openid callback setup page (#155)
1 parent 1473aaa commit 9a174eb

File tree

4 files changed

+59
-65
lines changed

4 files changed

+59
-65
lines changed

web/biome.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
"bracketSpacing": true,
2828
"expand": "auto",
2929
"useEditorconfig": true,
30-
"includes": [
31-
"./src/**"
32-
]
30+
"includes": ["./src/**"]
3331
},
3432
"linter": {
3533
"enabled": true,
@@ -70,9 +68,7 @@
7068
"noArrayIndexKey": "off"
7169
}
7270
},
73-
"includes": [
74-
"src/**"
75-
]
71+
"includes": ["src/**"]
7672
},
7773
"javascript": {
7874
"formatter": {
@@ -94,9 +90,7 @@
9490
},
9591
"overrides": [
9692
{
97-
"includes": [
98-
"**/*.js"
99-
]
93+
"includes": ["**/*.js"]
10094
}
10195
],
10296
"assist": {

web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
]
3838
},
3939
"onlyBuiltDependencies": [
40+
"@parcel/watcher",
4041
"@swc/core",
4142
"esbuild"
4243
]
@@ -82,7 +83,7 @@
8283
"zustand": "^5.0.8"
8384
},
8485
"devDependencies": {
85-
"@biomejs/biome": "2.2.0",
86+
"@biomejs/biome": "2.2.2",
8687
"@hookform/devtools": "^4.4.0",
8788
"@svgr/cli": "^8.1.0",
8889
"@tanstack/react-query": "^4.40.1",

web/pnpm-lock.yaml

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/pages/openidCallback/components/OpenIDCallbackCard.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import './style.scss';
33
import { useQuery } from '@tanstack/react-query';
44
import type { AxiosError } from 'axios';
55
import { useMemo, useState } from 'react';
6+
import Markdown from 'react-markdown';
67
import QRCode from 'react-qr-code';
78
import { useBreakpoint } from 'use-breakpoint';
89
import { useI18nContext } from '../../../i18n/i18n-react';
@@ -130,17 +131,7 @@ export const OpenIDCallbackCard = () => {
130131
<Card shaded={breakpoint !== 'mobile'} className="openidcallback-card">
131132
<h2>{LL.pages.oidcLogin.card.title()}</h2>
132133
<BigInfoBox message={LL.pages.oidcLogin.card.infoBox()} />
133-
<h3>
134-
Please enter the provided Instance URL and Token into your Defguard Client. You
135-
can scan the QR code, click the button below or copy and paste the token manually.
136-
</h3>
137-
{isPresent(data) && (
138-
<>
139-
<CopyField label="Url" value={data.url} onCopy={writeToClipboard} />
140-
<CopyField label="Token" value={data.token} onCopy={writeToClipboard} />
141-
</>
142-
)}
143-
134+
<MessageBox message="If you want to configure your Defguard desktop client, please install the client (links below), open it and just press the One-Click Desktop Configuration button" />
144135
{isPresent(deepLink) && (
145136
<div className="row">
146137
<a href={deepLink} target="_blank" rel="noopener noreferrer">
@@ -152,19 +143,27 @@ export const OpenIDCallbackCard = () => {
152143
</a>
153144
</div>
154145
)}
146+
<MessageBox>
147+
<Markdown>
148+
{
149+
'If you are having trouble with the One-Click configuration you can do it manually by clicking *Add Instance* in the desktop client, and entering the following URL and Token:'
150+
}
151+
</Markdown>
152+
</MessageBox>
153+
{isPresent(data) && (
154+
<>
155+
<CopyField label="Url" value={data.url} onCopy={writeToClipboard} />
156+
<CopyField label="Token" value={data.token} onCopy={writeToClipboard} />
157+
</>
158+
)}
159+
<MessageBox message="If you want to configure your Mobile Defguard Client, please just scan this QR code in the app:" />
155160
{isPresent(qrData) && (
156161
<div className="row">
157162
<div className="qr">
158163
<QRCode value={qrData} />
159164
</div>
160165
</div>
161166
)}
162-
<div className="row">
163-
<p className="qr-description">
164-
Scan the QR code with your installed Defguard app. If you haven't installed it
165-
yet, use your device's app store or the link below.
166-
</p>
167-
</div>
168167
<div className="row">
169168
<a
170169
href={sharedLinks.client.download.android}

0 commit comments

Comments
 (0)