Skip to content
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-3734] add authentication callback route #445

Open
wants to merge 4 commits into
base: CHK-3704-auth-outcome-management
Choose a base branch
from

Conversation

scaminati-bv
Copy link
Collaborator

@scaminati-bv scaminati-bv commented Feb 24, 2025

List of Changes

  • add auth-callback page
  • retrive auth-code from url query param
  • save last page into session storage before login click
  • go back to the saved page after retrieving the token

Motivation and Context

The goal of this PR is to add callback page where auth code is retrieving and then go back to saved page

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@ciuffagianluca ciuffagianluca changed the base branch from main to CHK-3704-auth-outcome-management February 24, 2025 14:15
@scaminati-bv scaminati-bv self-assigned this Feb 25, 2025
@scaminati-bv scaminati-bv marked this pull request as ready for review February 25, 2025 09:19
@scaminati-bv scaminati-bv requested a review from a team as a code owner February 25, 2025 09:19
const authCode = searchParams.get("auth-code");

//if auth code exists save into session storage
if(authCode != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if authCode is null? In this case, invoking the post auth is unnecessary, so maybe we should display an error message and allow payment in guest mode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If authCode is null error message popup is displayed without call api, but this implementation is added in the PR that extend this one with post auth api call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, right, error handling is out of scope for the PR 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants