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 errors thrown by provider token function #722

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

haines
Copy link
Contributor

@haines haines commented Oct 10, 2023

If you set token to be a function in the provider configuration, and that function throws an error, that's currently an unhandled promise rejection.

This PR handles the error by calling the permissionDeniedHandler so that the provider emits an authenticationFailed event that the user can handle.

Signed-off-by: Andrew Haines <andrew@haines.org.nz>
@janthurau janthurau merged commit 8608651 into ueberdosis:main Oct 10, 2023
3 checks passed
@haines haines deleted the handle-token-failure branch October 10, 2023 19:55
TalhaASiddiqi pushed a commit to educative/hocuspocus that referenced this pull request Feb 1, 2024
Signed-off-by: Andrew Haines <andrew@haines.org.nz>
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