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

Added OIDC error types #69

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

adrienne-deriv
Copy link
Collaborator

Description

  • Added OIDC error types to distinguish different error scenarios during the OIDC authentication flow

Motivation

Please include the motivation behind this change. Why is this change required? What problem does it solve?

Actions

List the actions taken to achieve this change. What steps were followed? What was modified?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

}

export const OIDCAuthenticationError = {
FailedToFetchOIDCConfiguration: new OIDCError('Failed to fetch OIDC configuration'),

Choose a reason for hiding this comment

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

Was thinking to have an error code instead of message to differentiate error better

AuthenticationRequestFailed = "AuthenticationRequestFailed",
AccessTokenRequestFailed = "AccessTokenRequestFailed",
LegacyTokenRequestFailed = "LegacyTokenRequestFailed",
UserManagerCreationFailed = "UserManagerCreationFailed"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't use integers because I wanted to pass this error type into the Error interface, which does not have any integer attribute supported
Screenshot 2024-11-06 at 2 58 17 PM

@thisyahlen-deriv thisyahlen-deriv merged commit fc367b1 into deriv-com:master Nov 6, 2024
1 check passed
Copy link

github-actions bot commented Nov 6, 2024

🎉 This PR is included in version 1.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants