Facing issue when trying add Auth0.OidcClient to my Xamarin project

Hello,

Facing issue when trying add Auth0.OidcClient to my Xamarin project.

Steps done:

Installed Auth0.OidcClient.Android and Auth0.OidcClient.iOS packages for appropriate directories.

Added following code in page.cs:

using Auth0.OidcClient;
...

 var client = new Auth0Client(new Auth0ClientOptions
        {
            Domain = "dragonsms.auth0.com",
            ClientId = "Wc7asdX2k5Rn2eCetr4pOlgWmUbsGrV9V4L"
        });
        var loginResult = await client.LoginAsync();
    }

When try to run getting following:

Error CS0246: The type or namespace name ‘Auth0’ could not be found (are you missing a using directive or an assembly reference?)

P.S.

In PCL project everything working fine

For future developers coming across this issue, we can check that the Auth0.OidcClient.Android and Auth0.OidcClient.iOS packages are under the Packages section of your project. If for some reason Xamarin is still not recognizing the installed packages we ask that you please try uninstalling the packages and reinstall them. After that we can restart Xamarin, and select Build > Clean All .

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.