FormidableLabs / FormidableLabs/react-native-app-auth
Imgur doesn't accept redirect_uri
- Lenguaje dominante
- Java
- Estrellas
- 2.3k
- Forks
- 473
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## 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
Guía de contribución
Línea de trabajo
No se nombra ningún archivo del repositorio, prueba ni punto de entrada. Empieza reproduciendo el flujo de autorización de Imgur en Android con react-native-app-auth 8.0.0 y compara las solicitudes con y sin redirect_uri; se considera completado cuando el flujo OAuth esperado de Imgur funciona correctamente sin el error de URI de redirección indicado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, react-native
- Área
- authentication, mobile
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100