MaikuB / MaikuB/flutter_appauth

Error code formats do not match on different platforms

Open
#400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
308
Forks
301
Avg merge
2d 11h
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the Android and iOS implementations for TOKEN_ERROR_MESSAGE_FORMAT and inspect the refreshAccessToken() error paths. Make the platform outputs use the same format, including the preferred brackets around the underlying error code, and verify both examples produce matching messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, flutter, ios
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.