MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
269 stars 239 forks source link

Error code formats do not match on different platforms #400

Open spekary opened 1 year ago

spekary commented 1 year ago

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.

MaikuB commented 1 year ago

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?