FormidableLabs / FormidableLabs/react-native-app-auth
Tiktok support
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 473
- PR merge metrics
- No merged PRs in 30d
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?
Contributor guide
Research direction
Start with the authorize API and the authorization URL generation path, then compare its parameter handling with TikTok's Login Kit documentation. Define how customParameterNames, encodeParameterValues, and staticAuthorizeUrl should affect generated URLs, and verify the resulting behavior against TikTok's client_key and comma-separated scope requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- authentication, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100