flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

Error code formats do not match on different platforms

Open spekary opened this issue 1 year ago • 1 comments

Passing a bad token to refreshAccessToken() on Android results in:

Failed to get token: [invalid_grant: invalid token]

However on iOS I get:

Failed to get token: invalid_grant: invalid token

Looking at the error message format string TOKEN_ERROR_MESSAGE_FORMAT, sure enough, its different on different platforms.

Please keep these consistent so if we need to extract the underlying error, we don't have to do it on a per platform basis. I like the brackets because it makes it easy to find the underlying error code.

spekary avatar Jan 19 '23 20:01 spekary

Thanks will take a look but since you have mentioned this, what are your thoughts on what's been proposed in https://github.com/MaikuB/flutter_appauth/pull/395?

MaikuB avatar Feb 02 '23 06:02 MaikuB