FormidableLabs / FormidableLabs/react-native-app-auth

Tiktok support

Ouverte
#1,102 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
2.3k
Forks
473
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Some OAuth2 providers have a slightly different implementation than the official specification.

If we take the case of TikTok's implementation, here are the differences in the URL parameters during the authorization procedure:

* The `client_id` parameter is named `client_key`.
* The `scope` parameter value is comma separated and **not URL encoded**.

It should be possible to specify how to change the parameters when generating the authorization URL, for example, by initializing it with new parameters:

```js
const result = await authorize({
customParameterNames: {
clientId: 'client_key'
...
},
encodeParameterValues: {
scope: false
},
staticAuthorizeUrl: 'https://example.com/authorize',
});
```
| Parameter | Type | Description |
| - | - | - |
| customParameterNames | **Object** | Specifies all parameters that should be renamed when generating the authorization URL. |
| encodeParameterValues | **Object** | Specifies all parameters that should be encoded or not when generating the authorization URL. |
| staticAuthorizeUrl | **String** | Specify to skip authorization URL generation and get this one |

Tiktok documentation :
https://developers.tiktok.com/doc/login-kit-web?enter_method=left_navigation

Any ideas?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par l’authorize API et le chemin de génération de l’URL d’autorisation, puis comparez la gestion de ses paramètres avec la documentation de TikTok Login Kit. Définissez l’effet que customParameterNames, encodeParameterValues et staticAuthorizeUrl doivent avoir sur les URL générées, et vérifiez le comportement obtenu par rapport aux exigences de TikTok concernant client_key et les valeurs de scope séparées par des virgules.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react-native
Domaine
authentication, mobile
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.