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

Send user back to oauth flow after login #100

Merged
merged 8 commits into from
Sep 20, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Sep 14, 2023

Telescoping on #91

Relies on https://github.com/chromaui/chromatic/pull/7724 ✅ - ensure that after login the dialog doesn't auto close, instead it redirects you back to where you wanted to go (granting permission).

📦 Published PR as canary version: 0.0.86--canary.100.b09c8e2.0

✨ Test out this PR locally via:

npm install @chromaui/addon-visual-tests@0.0.86--canary.100.b09c8e2.0
# or 
yarn add @chromaui/addon-visual-tests@0.0.86--canary.100.b09c8e2.0

@linear
Copy link

linear bot commented Sep 14, 2023

AP-3575 Chromatic sign-in closes OAuth popup

How is the user affected? And what is the expected behavior?

While connecting to Chromatic whilst not (yet) authenticated to Chromatic itself yet, the OAuth dialog closes as soon as you sign in to Chromatic, before you can finish the OAuth flow.

When signing in to Chromatic as part of an OAuth flow, the user should be redirected back to that OAuth flow after signing in.

How many and/or what class of users does this impact?

Users of the Visual Test addon and Figma plugin who are not (yet) signed in to Chromatic.

Is there a workaround?

Sign in to Chromatic, then restart the OAuth flow.

What are the steps for reproducing the issue?

Sign out of Chromatic and sign out of the addon/plugin. Now connect the addon/plugin to Chromatic. After confirming the OAuth connection code, you are prompted to sign in to Chromatic. Once you do this, the OAuth popup closes automatically, making it impossible to finish the flow.

Other information

Fixing this might involve fixing the "redirect back to where you came from" problem we have in general.

src/utils/useChromaticDialog.ts Outdated Show resolved Hide resolved
src/utils/useChromaticDialog.ts Outdated Show resolved Hide resolved
src/screens/Authentication/Verify.tsx Outdated Show resolved Hide resolved
src/utils/useChromaticDialog.ts Outdated Show resolved Hide resolved
src/utils/useChromaticDialog.ts Outdated Show resolved Hide resolved
tmeasday added a commit that referenced this pull request Sep 18, 2023
Copied and adapted with help from @kasperpeulen from #100
@tmeasday tmeasday changed the base branch from main to tom/ap-3630-add-workflow-for-creating-a-new-project September 19, 2023 02:20
@tmeasday
Copy link
Member Author

Apologies @tevanoff this branch got messed up as I responded to feedback. I've fixed it up via merging in #91 and checked my QA instructions do work! Thanks.

Base automatically changed from tom/ap-3630-add-workflow-for-creating-a-new-project to main September 19, 2023 23:53
@tmeasday tmeasday merged commit cc1389b into main Sep 20, 2023
5 of 6 checks passed
@tmeasday tmeasday deleted the tom/ap-3575-chromatic-sign-in-closes-oauth-popup branch September 20, 2023 08:04
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.

None yet

3 participants