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

Handle access_denied from Hello, update README #1

Merged
merged 1 commit into from May 20, 2022
Merged

Conversation

leewc
Copy link
Contributor

@leewc leewc commented May 20, 2022

When a user decides to not proceed with hellō, the user is redirected back to the configured callback URL with the following:

- http://localhost:3000/callback#error=access_denied&error_description=&error_uri=
- https://next-with-hello-leewc.vercel.app/#error=access_denied&error_description=&error_uri=

This PR checks if the hash contains and error, redirects to the backend and returns a 403 if it is denied.
An alternative behavior would be to redirect back to / and have a message bubble saying Hello OAuth flow cancelled.

Docs:

Testing:

  • Click Login
  • Continue with Hello
  • Select an identity provider and then click 'cancel' on the OAuth dialog.
  • Redirection happens.

Code can be played around here: http://next-with-hello-leewc.vercel.app/ (or copy paste the URL above to simulate the behavior).

I cloned the repo using Vercel (which unfortunately makes the repo a standalone/not a Github fork, so I had to test and then cherry-pick the commit over).

@irrelevelephant irrelevelephant merged commit c6050d3 into irrelevelephant:main May 20, 2022
@irrelevelephant
Copy link
Owner

Thank you!

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

2 participants