Open dzuluaga opened 3 months ago
Hi @dzuluaga
Indeed initialize()
method is not necessary for the packages to work.
We simply have it so that users would be able to add additional steps like we can see on MS side here:
I've added bit more detailed explanation for this step in docs with this PR - https://github.com/openmobilehub/android-omh-auth/pull/109
The
initialize()
method in theauthClientProvider
seems to be redundant or confusing. Currently, it's possible to use theauthClientProvider.getClient()
method and proceed with authentication operations without explicitly callinginitialize()
. This raises the question: what is the purpose of theinitialize()
method if the client can function without it?Steps to Reproduce:
Set up the
authClientProvider
using the following code:Attempt to use the client without calling
initialize()
:Expected Behavior: If
initialize()
is necessary, the client should not function correctly without it. Alternatively, if it’s not necessary, it should be clarified when and whyinitialize()
should be used.Actual Behavior: The client appears to work fine without calling
initialize()
, which creates confusion about the necessity and role of theinitialize()
method.Additional Context: This issue might lead to developers misunderstanding the API usage or possibly omitting
initialize()
without knowing its potential benefits or requirements.