Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pandukakarunasena committed May 11, 2023
1 parent a20ecb0 commit 2ded725
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 64 deletions.
17 changes: 17 additions & 0 deletions samples/asgardeo-react-app/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ code {
margin-right: 0;
}

.error-page_h6 {
font-size: 30px;
text-transform: uppercase;
font-weight: 600;
margin-top: 3rem;
margin-bottom: 8px;
color: #151515;
}

.error-page_p {
font-size: 20px;
font-weight: 400;
margin-top: 3rem;
margin-bottom: 3rem;
color: #151515;
}

@media screen and (max-width: 600px) {
.column {
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions samples/asgardeo-react-app/src/error-boundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { AsgardeoAuthException } from "@asgardeo/auth-react";
import React, { FunctionComponent, ReactElement } from "react";
import { AuthenticationFailure } from "./pages/AuthenticationFailure";
import { InvalidSystemTimePage } from "./pages/InvalidSystemTime";
import {IssuerClaimValidationFailure} from "./pages/IssuerClaimValidationFailuer";
import {VerifyIDTokenFailure} from "./pages/VerifyIDTokenFailure";
import { IssuerClaimValidationFailure } from "./pages/IssuerClaimValidationFailure";
import { VerifyIDTokenFailure } from "./pages/VerifyIDTokenFailure";

interface ErrorBoundaryProps {
error: AsgardeoAuthException;
Expand Down
17 changes: 2 additions & 15 deletions samples/asgardeo-react-app/src/pages/InvalidSystemTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,10 @@ export const InvalidSystemTimePage: FunctionComponent = (): ReactElement => {

return (
<DefaultLayout>
<h6 style={{
fontSize: "30px",
textTransform: "uppercase",
fontWeight: 600,
marginTop: "3rem",
marginBottom: "8px",
color: "#151515"
}}>
<h6 className="error-page_h6">
Your Clock is Invalid !
</h6>
<p style={{
fontSize: "20px",
fontWeight: 400,
marginTop: "3rem",
marginBottom: "3rem",
color: "#151515"
}}>
<p className="error-page_p">
It looks like your computer&rsquo;s date and time is incorrect. Please validate and try again
</p>
</DefaultLayout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -28,24 +28,11 @@ export const IssuerClaimValidationFailure: FunctionComponent = (): ReactElement

return (
<DefaultLayout>
<h6 style={{
fontSize: "30px",
textTransform: "uppercase",
fontWeight: 600,
marginTop: "3rem",
marginBottom: "8px",
color: "#151515"
}}>
<h6 className="error-page_h6">
Issuer claim validation failed!
</h6>
<p style={{
fontSize: "20px",
fontWeight: 400,
marginTop: "3rem",
marginBottom: "3rem",
color: "#151515"
}}>
The configured BaseURL in config.json might be incorrect.Make sure to remove any
<p className="error-page_p">
The configured BaseURL in config.json might be incorrect. Make sure to remove any
trailing spaces if present.
</p>
</DefaultLayout>
Expand Down
40 changes: 10 additions & 30 deletions samples/asgardeo-react-app/src/pages/VerifyIDTokenFailure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand All @@ -18,7 +18,11 @@

import React, { FunctionComponent, ReactElement } from "react";
import { DefaultLayout } from "../layouts/default";
import {AsgardeoAuthException} from "@asgardeo/auth-react";
import { AsgardeoAuthException } from "@asgardeo/auth-react";

interface VerifyIDTokenFailureProps {
error?: AsgardeoAuthException;
}

/**
* Page to display for ID token verifying failures Page.
Expand All @@ -27,42 +31,18 @@ import {AsgardeoAuthException} from "@asgardeo/auth-react";
*
* @return {React.ReactElement}
*/


interface VerifyIDTokenFailureProps {
error?: AsgardeoAuthException;
}
export const VerifyIDTokenFailure: FunctionComponent<VerifyIDTokenFailureProps> =
({error}): ReactElement => {

return (
<DefaultLayout>
<h6 style={{
fontSize: "30px",
textTransform: "uppercase",
fontWeight: 600,
marginTop: "3rem",
marginBottom: "8px",
color: "#151515"
}}>
<h6 className="error-page_h6">
ID token validation failed!
</h6>
<p style={{
fontSize: "20px",
fontWeight: 400,
marginTop: "3rem",
marginBottom: "3rem",
color: "#151515"
}}>
Issue occurred when verifying ID token.
<p className="error-page_p">
Issue occurred while verifying ID token.
</p>
<p style={{
fontSize: "18px",
fontWeight: 400,
marginTop: "1rem",
marginBottom: "3rem",
color: "#151515"
}}>
<p className="error-page_p">
Error message : {error?.message}<br />
Error reason : {error?.name}
</p>
Expand Down

0 comments on commit 2ded725

Please sign in to comment.