[LYN-4915] [iOS] [Android] awscoreconfiguration.setreg, awsMetricsClientConfigurationsetreg and authenticationProvider.setreg couldn't be loaded when the application starts (#1716)
[LYN-4915] [iOS] [Android] awscoreconfiguration.setreg, awsMetricsClientConfiguration.setreg and authenticationProvider.setreg couldn't be loaded when the application starts
This commit is contained in:
@@ -30,9 +30,16 @@ namespace AWSClientAuth
|
||||
m_settings.reset();
|
||||
}
|
||||
|
||||
bool GoogleAuthenticationProvider::Initialize(AZStd::weak_ptr<AZ::SettingsRegistryInterface> settingsRegistry)
|
||||
bool GoogleAuthenticationProvider::Initialize()
|
||||
{
|
||||
if (!settingsRegistry.lock()->GetObject(m_settings.get(), azrtti_typeid(m_settings.get()), GoogleSettingsPath))
|
||||
AZ::SettingsRegistryInterface* settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
if (!settingsRegistry)
|
||||
{
|
||||
AZ_Warning("AWSCognitoAuthenticationProvider", false, "Failed to load the setting registry");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!settingsRegistry->GetObject(m_settings.get(), azrtti_typeid(m_settings.get()), GoogleSettingsPath))
|
||||
{
|
||||
AZ_Warning("AWSCognitoAuthenticationProvider", false, "Failed to get Google settings object for path %s", GoogleSettingsPath);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user