vimeo / vimeo/vimeo-networking-java
Vimeo sdk is not working on android
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 128
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Vimeo sdk is not working on android. I am using github code in android. but log-in functionality is not working in demo.
Reproduction Steps
authenticate method not working. I have added client and secret key and I have added CODE_GRANT_REDIRECT_URL
I am using CODE_GRANT_REDIRECT_URL: vimeoa98a01c93be150d26c2739b713429580bc0d47f2://auth. and I have added in manifeast
private fun authenticate(redirectUri: Uri?, authenticator: Authenticator) {
if (redirectUri != null) {
// Optional, but for security purposes, we can verify that the code we specified is returned to us.
val requestCode = redirectUri.getQueryParameter("state")
require(requestCode == REQUEST_CODE)
// Log in using the code grant URI provided to us by the redirect.
authenticator.authenticateWithCodeGrant(redirectUri.toString(), vimeoCallback(
onSuccess = {
toast("Successfully logged in.")
binding.loginStatus.text = authenticator.currentAccount.asLoginStatus()
},
onError = { toast("Unable to log in.") }
))
} else {
// Obtain client credentials which can be used to make logged out requests.
// Obtaining client credentials is technically optional and basic auth can be used instead. However, using
// basic auth can result in your client secret being leaked, so it is better to use client credentials. If
// client credentials are not obtained or this request fails, the VimeoApiClient will fall back to basic
// authentication.
authenticator.authenticateWithClientCredentials(vimeoCallback(
onSuccess = {
toast("Obtained client credentials.")
binding.loginStatus.text = authenticator.currentAccount.asLoginStatus()
},
onError = { toast("Couldn't obtain client credentials.") }
))
}
}
Expected Behavior
I have received error:
Api(reason=ApiError(developerMessage=Code grant authentication error, errorMessage=null, errorCode=null, invalidParameters=[InvalidParameter(field=code, errorCode=2204, error=null, developerMessage=URI was invalid or did not contain a 'code' parameter)], link=null), httpStatusCode=-1)
Actual Behavior
What currently happens as a result of the reproduction steps?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the demo's authenticate method and the Android manifest intent-filter shown in the report. Trace how the redirect URI reaches authenticateWithCodeGrant and verify whether the returned URI contains the expected code parameter. Done means the demo login completes successfully without the reported invalid-URI error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100