Skip to content

Refresh token error codes are not unified across platforms and providers #377

@henninghall

Description

@henninghall

Issue

When the refresh token expires (could be due to changing password, not being used for a while etc) the error message sent from the library is different depending on platform and provider. It would be very nice if this could be unified.

Example

Responses for Google and Azure, havn't tried the others in the table below.

catch(e) {
    e.code // ErrorCode in example below
    e.message // ErrorMessage in example below
}
AndroidiOS
Azure ErrorCode: Failed to refresh token
ErrorMessage: AADSTS50173: The provided grant has expired due to it being revoked ....
ErrorCode: RNAppAuth Error
ErrorMessage: invalid_grant: AADSTS50173: The provided grant has expired due to it being revoked
Google ErrorCode: Failed to refresh token ErrorMessage: Token has been expired or revoked. ErrorCode: RNAppAuth Error ErrorMessage: invalid_grant: Token has been expired or revoked.

Suggested fix

The same error should return the same error code defined by the library. The error messages could be kept as they are.

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