FormidableLabs / FormidableLabs/react-native-app-auth
Imgur doesn't accept redirect_uri
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 473
- PR merge metrics
- No merged PRs in 30d
Description
## Issue
I followed the instructions provided in https://github.com/FormidableLabs/react-native-app-auth/issues/516#issuecomment-2115465572.
`react-native-app-auth` generated the url:
```
https://api.imgur.com/oauth2/authorize?redirect_uri=com.myapp%253A%252F%252Foauth&client_id=xxxx&response_type=code&state=CeCjYuaMTtKVEuGvcW5EtA&nonce=DK8X_F3jH_z7F2dxgcNfRQ&code_challenge=eaUwn9soj0T-o2xMJCFj0WDZShVjoS1ENrLOSZVWX_s&code_challenge_method=S256
```
However, this resulted in an error:
```
{
"data": {
"error": "The redirect URI provided is missing or does not match",
"request": "/oauth2/authorize",
"method": "POST"
},
"success": false,
"status": 400
}
```
Since the Imgur API documentation doesn't mention the need for a `redirect_uri`, I decided to remove it from the URL:
```
https://api.imgur.com/oauth2/authorize?client_id=xxxx&response_type=code&state=CeCjYuaMTtKVEuGvcW5EtA&nonce=DK8X_F3jH_z7F2dxgcNfRQ&code_challenge=eaUwn9soj0T-o2xMJCFj0WDZShVjoS1ENrLOSZVWX_s&code_challenge_method=S256
```
This modification successfully resolved the error.
## Environment
* **Your Identity Provider**: `imgur`
* **Platform that you're experiencing the issue on**: `Android`
* **Your `react-native` Version**: `0.74.5`
* **Your `react-native-app-auth` Version**: `8.0.0`
* **Are you using Expo?** Yes
Contributor guide
Assessment
This issue has not been assessed yet.