When the OMH Android Auth SDK cannot find the correct provider due to invalid paths, it throws a generic error:
null cannot be cast to non-null type com.openmobilehub.android.auth.core.OmhAuthFactory
This error is unclear and doesn't help developers identify that the issue is with incorrect provider paths.
Expected Behavior
Better Error Messages: The SDK should clearly indicate that the error is due to invalid or incorrect provider paths, helping developers quickly identify and fix the issue.
Use of Constants: Replace string paths with predefined constants from the GMS and non-GMS libraries, similar to how it's done in the storage module (e.g., GoogleDriveGmsConstants.IMPLEMENTATION_PATH). This minimizes errors from using incorrect strings.
Action Items
Improve Error Handling:
Update the SDK to throw a clear and specific error when invalid paths are provided.
Include guidance in the error message for checking or using the correct paths.
Implement Constants:
Introduce constants for GMS and non-GMS paths in the Auth SDK.
Update the documentation to reflect the use of these constants.
Reference
OMH Storage Module: Example of using constants for implementation paths.
Why This Matters
Clear error messages and consistent use of constants will improve the developer experience and reduce errors in configuration.
Problem
When the OMH Android Auth SDK cannot find the correct provider due to invalid paths, it throws a generic error:
This error is unclear and doesn't help developers identify that the issue is with incorrect provider paths.
Expected Behavior
Better Error Messages: The SDK should clearly indicate that the error is due to invalid or incorrect provider paths, helping developers quickly identify and fix the issue.
Use of Constants: Replace string paths with predefined constants from the GMS and non-GMS libraries, similar to how it's done in the storage module (e.g.,
GoogleDriveGmsConstants.IMPLEMENTATION_PATH
). This minimizes errors from using incorrect strings.Action Items
Improve Error Handling:
Implement Constants:
Reference
Why This Matters
Clear error messages and consistent use of constants will improve the developer experience and reduce errors in configuration.