diff --git a/.vscode/launch.json b/.vscode/launch.json index 69c3e986..0a0eef6e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,8 +5,8 @@ "version": "0.2.0", "compounds": [ { - "name": "Identity Server & Accounts API & SPA", - "configurations": ["Accounts API", "Identity Server", "SPA"] + "name": "Solution", + "configurations": ["Accounts API", "Identity Server", "Start SPA", "Debug SPA"] } ], "configurations": [ @@ -30,7 +30,7 @@ "ASPNETCORE_URLS": "https://localhost:5000", "ASPNETCORE_HTTPS_PORT": "5000", "IDENTITY_SERVER_ORIGIN": "https://localhost:5000", - "RedirectUris": "https://localhost:5002/callback", + "RedirectUris": "https://localhost:5002/signin-oidc", "PostLogoutRedirectUris": "https://localhost:5002", "AllowedCorsOrigins": "https://localhost:5002" }, @@ -65,7 +65,7 @@ } }, { - "name": "SPA", + "name": "Start SPA", "type": "node", "request": "launch", "cwd": "${workspaceFolder}/wallet-spa", @@ -77,7 +77,8 @@ "request": "launch", "name": "Debug SPA", "url": "https://localhost:5002", - "webRoot": "${workspaceFolder}/wallet-spa" + "webRoot": "${workspaceFolder}/wallet-spa", + "runtimeExecutable": "canary" }, { "name": "Accounts API (Docker)", diff --git a/wallet-spa/.env.localhost b/wallet-spa/.env.localhost index a1667b82..effdc4b9 100644 --- a/wallet-spa/.env.localhost +++ b/wallet-spa/.env.localhost @@ -1,6 +1,14 @@ -REACT_APP_AUTHORITY=https://localhost:5000 -REACT_APP_REDIRECT_URI=https://localhost:5002/callback -REACT_APP_POST_LOGOUT_REDIRECT_URI=https://localhost:5002 -REACT_APP_ACCOUNTS_API=https://localhost:5001 HTTPS=true PORT=5002 +REACT_APP_ACCOUNTS_API=https://localhost:5001 +REACT_APP_AUDIENCE=https://localhost:5000 +REACT_APP_AUTH_URL=https://localhost:5000 +REACT_APP_AUTHORITY=https://localhost:5000 +REACT_APP_IDENTITY_CLIENT_ID=spa +REACT_APP_ISSUER=https://localhost:5000 +REACT_APP_LOGOFF_REDIRECT_URL=https://localhost:5002/logout +REACT_APP_POST_LOGOUT_REDIRECT_URI=https://localhost:5002/logout/callback +REACT_APP_REDIRECT_URI=https://localhost:5002/signin-oidc +REACT_APP_REDIRECT_URL=https://localhost:5002/signin-oidc +REACT_APP_SCOPE=openid profile api1.full_access +REACT_APP_SILENT_REDIRECT_URL=https://localhost:5002/silentrenew diff --git a/wallet-spa/src/App.jsx b/wallet-spa/src/App.jsx index 10494caa..cee1f5f7 100644 --- a/wallet-spa/src/App.jsx +++ b/wallet-spa/src/App.jsx @@ -1,18 +1,14 @@ -import "./App.css"; -import React from "react"; -import { Component } from "react"; -import Layout from "./components/Layout"; +import React, { Component } from "react"; +import { AuthProvider } from "./providers/authProvider"; +import { BrowserRouter } from "react-router-dom"; +import { Routes } from "./routes/routes"; export default class App extends Component { - static displayName = App.name; - - constructor(props) { - super(props) - } - render() { return ( - + + + ) }; } \ No newline at end of file diff --git a/wallet-spa/src/App.test.js b/wallet-spa/src/App.test.js deleted file mode 100644 index 4db7ebc2..00000000 --- a/wallet-spa/src/App.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - const { getByText } = render(); - const linkElement = getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/wallet-spa/src/components/Header.jsx b/wallet-spa/src/components/Header.jsx index 0e8546f2..124e8573 100644 --- a/wallet-spa/src/components/Header.jsx +++ b/wallet-spa/src/components/Header.jsx @@ -95,10 +95,6 @@ const styles = (theme) => ({ class Header extends React.Component { - constructor(props) { - super(props) - } - render() { const { handleChangeNavDrawer, navDrawerOpen, classes } = this.props diff --git a/wallet-spa/src/components/Layout.jsx b/wallet-spa/src/components/Layout.jsx index d2cf07aa..3ed23fb9 100644 --- a/wallet-spa/src/components/Layout.jsx +++ b/wallet-spa/src/components/Layout.jsx @@ -6,7 +6,7 @@ import SideMenu from "../components/SideMenu"; import Footer from "../components/Footer"; import MainContent from "../components/MainContent"; import { ThemeProvider } from "@material-ui/core/styles"; -import defaultTheme, { customTheme } from "../theme"; +import defaultTheme from "../theme"; import classNames from "classnames"; const styles = () => ({ @@ -69,10 +69,9 @@ class Layout extends React.Component { return (
- +
- +