Skip to content

Commit 01c2aa4

Browse files
authored
Merge pull request #214 from os2display/feature/openid-connect-code-flow
Code authorization flow
2 parents 6150512 + e28ad5a commit 01c2aa4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- [#214](https://github.com/os2display/display-admin-client/pull/214)
8+
Use OIDC Code authorization flow and remove React StrictMode.
9+
710
## [1.4.0] - 2023-09-14
811

912
- [#210](https://github.com/os2display/display-admin-client/pull/210)

src/components/user/login.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ function Login() {
130130

131131
useEffect(() => {
132132
let isMounted = true;
133-
let idToken = null;
133+
let code = null;
134134
let state = null;
135135

136136
if (search) {
137137
const query = queryString.parse(search);
138-
idToken = query.id_token;
138+
code = query.code;
139139
state = query.state;
140140
}
141141

142142
ConfigLoader.loadConfig().then((config) => {
143-
if (state && idToken) {
143+
if (state && code) {
144144
fetch(
145-
`${config.api}v1/authentication/oidc/token?state=${state}&id_token=${idToken}`,
145+
`${config.api}v1/authentication/oidc/token?state=${state}&code=${code}`,
146146
{
147147
mode: "cors",
148148
credentials: "include",

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ const root = createRoot(container);
1010

1111
root.render(
1212
<Provider store={store}>
13-
<React.StrictMode>
14-
<BrowserRouter basename="/admin">
15-
<App />
16-
</BrowserRouter>
17-
</React.StrictMode>
13+
<BrowserRouter basename="/admin">
14+
<App />
15+
</BrowserRouter>
1816
</Provider>
1917
);

0 commit comments

Comments
 (0)