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

Add original oauth error to IdentityProviderException #969

Open
uncaught opened this issue Sep 6, 2022 · 0 comments
Open

Add original oauth error to IdentityProviderException #969

uncaught opened this issue Sep 6, 2022 · 0 comments

Comments

@uncaught
Copy link

uncaught commented Sep 6, 2022

I would like to ask to add a new getter/setter to the IdentityProviderException so that you and other libraries can provide accurate access to the original oauth error.

I'm talking about the error strings described in https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-20#section-5.2, like invalid_grant.

Accessing this underlying error might be quite important when handling the status of a connected account, but currently it is unclear how to retrieve it. Especially since I intend to implement several providers with KnpU\OAuth2ClientBundle.

I ran into this problem because TheNetworg/oauth2-azure concated that error with the error description, giving me no real access.

It might even be prudent to create a new exception with that error field required. And only allow exactly the spec-defined values.

Of course by the time this is implemented and all the other libraries adopted it, my software will be long done. But I hope this might help someone in the future.

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

No branches or pull requests

1 participant