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

Update OAuth Error Page #830

Open
PeterBreen opened this issue Jan 5, 2022 · 1 comment · May be fixed by #1081
Open

Update OAuth Error Page #830

PeterBreen opened this issue Jan 5, 2022 · 1 comment · May be fixed by #1081
Assignees
Labels
Full Stack Both front- and back-end work required

Comments

@PeterBreen
Copy link
Collaborator

PeterBreen commented Jan 5, 2022

Our error page for any failed or cancelled attempt at logging in with oauth (Github, FB, LinkedIn, etc) is currently unstyled, and not in the DemocracyLab page template:

image

The easiest way to get to this error page is:

  • Go to DLab's login page (use staging, as it's set up for oauth and dev/prod-mirror are not)
  • Select "Continue with LinkedIn" (or any OAuth provider, but for this example LI)
  • Click "Cancel"
  • Wait 5s for the redirect back to DLab.

To solve this issue, this error page should be:

  • in the DemocracyLab page template (i.e. showing our header, footer, etc)
    • If this requires a new page (it might) creating and routing to a new front end section, see issue Documentation: New Page Tutorial #493 for an example of page creation, and/or ask on slack until we get that properly documented.
    • We may be able to reuse the existing ErrorController, and that'd be my preference if possible.
  • remove the Menu section of the page content, those links are broken
  • the remaining page content can otherwise stay unchanged for now -- we'll do a separate ticket for the error text since I'll ask one of our UX Writers to handle it.

More broadly,

  • find out where this page content is coming from
  • find out how to display one of our front end sections instead, so we can make it clear to users they're on DemocracyLab and seeing a DemocracyLab error

Pull Request #386 and may provide useful context for this issue.

@PeterBreen PeterBreen added the Full Stack Both front- and back-end work required label Jan 5, 2022
@harmeet9307 harmeet9307 self-assigned this Mar 23, 2022
@SleeplessRegina SleeplessRegina self-assigned this Apr 4, 2023
@QuanGiap QuanGiap pinned this issue Aug 1, 2023
@QuanGiap QuanGiap unpinned this issue Aug 1, 2023
@QuanGiap QuanGiap assigned QuanGiap and unassigned QuanGiap Aug 1, 2023
@ashwin-sp ashwin-sp self-assigned this Aug 25, 2023
@ashwin-sp
Copy link
Collaborator

ashwin-sp commented Sep 12, 2023

I was able to recreate this error in local by using my GitHub app and LinkedIn page credentials (since we are not going to login but just fix the cancel event).

Due to a helpful pointer from @QuanGiap and others in the group, I was able to deduce that a default error url was getting injected and was contemplating adding a custom url path rule on top of this similar to this stackoverflow.

But I found a better solution similar to this stackoverflow which is less of a hack than the previous one. I overrode this method to do an Immediate HTTP redirect back to the login page on any error (or user cancel) in authentication flow. If this works in production, then it will be the official solution for the fix.

@ashwin-sp ashwin-sp linked a pull request Dec 19, 2023 that will close this issue
@ddfridley ddfridley moved this from Backlog to Ready for testing. in DemocracyLab Development and Release May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Stack Both front- and back-end work required
Projects
Status: Ready for testing.
5 participants