Skip to content

Add original oauth error to IdentityProviderException #969

@uncaught

Description

@uncaught

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions