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

PORTALS-3299: proposed solution for oauth sign in app when prompt is … #1328

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

jay-hodgson
Copy link
Member

…set to login

Comment on lines 52 to 54
setTimeout(() => {
window.location.assign(href)
}, 10)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why setTimeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I mistakenly thought that cookies.set() was an async operation so I wanted to queue this redirect! I will remove the setTimeout

cookies.set(ACCOUNT_SITE_PROMPTED_FOR_LOGIN_COOKIE_KEY, 'true', {
path: '/',
expires: expireDate,
domain: hostname.endsWith('.synapse.org') ? 'synapse.org' : undefined,
Copy link
Collaborator

@nickgros nickgros Oct 29, 2024

Choose a reason for hiding this comment

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

This may not work on dev (which is OK for now, since we don't have a dev OAuth app or accounts site)

@jay-hodgson jay-hodgson merged commit faf738e into Sage-Bionetworks:main Oct 29, 2024
24 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.

2 participants