Closed dzuluaga closed 1 month ago
Hi Diego, I’m not sure if the root cause of the issue is about including class name (AndroidApplication
). It works on our end and we include the class name both in auth and storage applications.
To help you with debugging this issue, can you please tell if you use the same credentials (MICROSOFT_CLIENT_ID
and MICROSOFT_SIGNATURE_HASH
) as you do with auth application?
Hey @dzuluaga, thanks for bringing this to our attention! This was addressed and should be fixed in https://github.com/openmobilehub/android-omh-storage/pull/70/commits/058a74cd859e45b372fddeb596d4538a01c2c2ce.
Hi Natalia and Maciej,
There's an issue with the
build.gradle.kts
file in the storage-sample project. Theredirect_uri
is currently set to point to theAndroidApplication
class itself instead of the namespace. This causes confusion for developers who expect to use the package name without the class name.The Azure UI explicitly requests the package name without including the class name. However, the current setup leads to a non-obvious error when attempting to log in with a Microsoft account.
Current Behavior
When trying to log in, users encounter an error message stating: "invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application."
This error is not immediately clear and makes troubleshooting difficult.
Expected Behavior
The
redirect_uri
inbuild.gradle.kts
should point to the namespace (package name) without including theAndroidApplication
class name. This would align with Azure UI expectations and prevent the current login error.Steps to Reproduce
redirect_uri
.Additional Context
The error appears to be caused by a mismatch between the registered redirect URI and the one provided in the application. Updating the
build.gradle.kts
file to use the correct namespace should resolve this issue.Proposed Solution
Update the
redirect_uri
inbuild.gradle.kts
to use only the package name, removing theAndroidApplication
class reference.