FormidableLabs / FormidableLabs/react-native-app-auth
Imgur doesn't accept redirect_uri
- Lingua principale
- Java
- Stelle
- 2.3k
- Fork
- 473
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non viene indicato alcun file del repository, test o punto di ingresso. Inizia riproducendo il flusso di autorizzazione di Imgur su Android con react-native-app-auth 8.0.0 e confronta le richieste con e senza redirect_uri; il lavoro è completato quando il flusso OAuth di Imgur previsto ha esito positivo senza l’errore di URI di reindirizzamento segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, react-native
- Ambito
- authentication, mobile
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100