-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHK-3703 login button #436
base: main
Are you sure you want to change the base?
Conversation
[CHK-3717] feat: add authentication integration test
[CHK-3716] add auth service api
🎉 All dependencies have been resolved ! |
? { xs: "background.paper" } | ||
: { xs: "background.default" }), | ||
sm: "background.paper", | ||
...(isFixed() ? { xs: "#f2f2f2" } : { xs: "background.default" }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the footer fixed in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is background.paper
no longer valid?
@@ -47,6 +51,9 @@ export default function Header() { | |||
}; | |||
const CartInfo = getSessionItem(SessionItems.cart) as Cart | undefined; | |||
const [drawstate, setDrawstate] = React.useState(false); | |||
const [enableAuthentication, setEnableAuthentication] = React.useState( | |||
getSessionItem(SessionItems.enableAuthentication) === "true" | |||
); | |||
const ignoreRoutes: Array<string> = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ignoreRoutes: Array<string> = [ | |
const ignoredRoutesForLogin: Array<string> = [ |
Or something like that, to make it clear that these are the paths that should not show the login button.
const [error, setError] = React.useState(""); | ||
const [errorModalOpen, setErrorModalOpen] = React.useState(false); | ||
|
||
const onError = (m: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this error exclusively dedicated to the URL request phase to proceed with the login? Perhaps the error handling will need to be further explored in a dedicated PR
onError: (e: string) => void; | ||
onResponse: (r: any) => void; | ||
}) => { | ||
const token = await callRecaptcha(recaptchaRef, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not include in chain? something like
const token = await callRecaptcha(recaptchaRef, true); | |
pipe( | |
fromNullable(token), | |
fromOption(() => { | |
onError(ErrorsType.GENERIC_ERROR); | |
return 'Token missing'; | |
}), | |
chain(...) |
Co-authored-by: Simone infante <[email protected]>
Co-authored-by: Simone infante <[email protected]>
Co-authored-by: Simone infante <[email protected]>
Co-authored-by: Simone infante <[email protected]>
Co-authored-by: Simone infante <[email protected]>
Depends on pagopa/pagopa-infra#2803, pagopa/pagopa-infra#2806, pagopa/pagopa-checkout-be-mock#91
This PR contains all PRs that introduce logins button to checkout fe pages
List of Changes
Motivation and Context
How Has This Been Tested?
Integration test
Screenshots (if appropriate):
Login

Logged user

Logout

Types of changes
Checklist: