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

Suisin/chore: fix redirection to dtrader everytime landing on home page after coming from smart trader #18120

Conversation

suisin-deriv
Copy link
Contributor

Changes:

Clear session storage once we land on Dtrader page so that OIDC won't take the session storage value

Screenshots:

Please provide some screenshots of the change.

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Mar 10, 2025 3:41am

Copy link
Contributor

github-actions bot commented Mar 7, 2025

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/deriv-com/deriv-app/pull/18120](https://github.com/deriv-com/deriv-app/pull/18120)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-suisin-deriv-suisin-webrel3761redirec-fc28c7.binary.sx?qa_server=red.derivws.com&app_id=31531
    - **Original**: https://deriv-app-git-fork-suisin-deriv-suisin-webrel3761redirec-fc28c7.binary.sx
- **App ID**: `31531`

Copy link
Contributor

github-actions bot commented Mar 7, 2025

Generating Lighthouse report...

@@ -95,6 +95,14 @@ const Trade = observer(() => {
return null;
}, [try_synthetic_indices, try_open_markets, category, subcategory]);

React.useEffect(() => {
const has_session_storage = !!sessionStorage.getItem('tradershub_redirect_to');
Copy link
Contributor

Choose a reason for hiding this comment

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

[m] by right this should be placed on the logic when we are redirecting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't clear the sessionStorage when routing happen is because OIDC call back page depends on the sessionStorage route, if we remove it before we redirect them to Dtrader page, when OIDC kicks in, it will bring user back to the tradershub home page.

amam-deriv
amam-deriv previously approved these changes Mar 7, 2025
Copy link
Contributor

@adrienne-deriv adrienne-deriv left a comment

Choose a reason for hiding this comment

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

LGTM

@amam-deriv amam-deriv merged commit b975059 into deriv-com:master Mar 10, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants