├── .gitignore ├── Details.md ├── GettingStarted.md ├── LICENSE ├── README.md ├── Xamarin.Auth0Client.Android.Sample.sln ├── Xamarin.Auth0Client.iOS.Sample-Classic.sln ├── Xamarin.Auth0Client.iOS.Sample.sln ├── Xamarin.Auth0Client.sln ├── icons ├── Auth0Client_128x128.png └── Auth0Client_512x512.png ├── samples ├── Auth0Client.Android.Sample │ ├── Assets │ │ └── AboutAssets.txt │ ├── Auth0Client.Android.Sample.csproj │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ ├── drawable │ │ │ └── Icon.png │ │ ├── layout │ │ │ └── Main.axml │ │ └── values │ │ │ └── Strings.xml │ └── packages.config ├── Auth0Client.iOS.Sample │ ├── AppDelegate.cs │ ├── Auth0Client.iOS.Sample-Classic.csproj │ ├── Auth0Client.iOS.Sample.csproj │ ├── Auth0Client_iOS_SampleViewController.cs │ ├── Auth0Client_iOS_SampleViewController.designer.cs │ ├── Info.plist │ ├── LoadingOverlay.cs │ ├── Main.cs │ └── packages.config └── README.md └── src ├── Auth0Client.Android ├── Auth0Client.Android.cs ├── Auth0Client.Android.csproj ├── DeviceIdProvider.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ └── values │ │ └── Strings.xml └── packages.config ├── Auth0Client.iOS ├── Auth0Client.iOS-Classic.csproj ├── Auth0Client.iOS.cs ├── Auth0Client.iOS.csproj ├── DeviceIdProvider.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config └── Auth0Client ├── Auth0Client.cs ├── Auth0Client.csproj ├── Auth0Constants.cs ├── Auth0User.cs ├── IDeviceIdProvider.cs ├── Properties └── AssemblyInfo.cs └── TokenValidator.cs /.gitignore: -------------------------------------------------------------------------------- 1 | #Xamarin Component build script 2 | buildPackage 3 | xpkg/ 4 | *.xam 5 | *.userprefs 6 | Components/ 7 | xamarin-component.exe 8 | 9 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 10 | [Bb]in/ 11 | [Oo]bj/ 12 | 13 | # mstest test results 14 | TestResults 15 | 16 | ## Ignore Visual Studio temporary files, build results, and 17 | ## files generated by popular Visual Studio add-ons. 18 | 19 | # User-specific files 20 | *.suo 21 | *.user 22 | *.sln.docstates 23 | 24 | # Build results 25 | [Dd]ebug/ 26 | [Rr]elease/ 27 | x64/ 28 | *_i.c 29 | *_p.c 30 | *.ilk 31 | *.meta 32 | *.obj 33 | *.pch 34 | *.pdb 35 | *.pgc 36 | *.pgd 37 | *.rsp 38 | *.sbr 39 | *.tlb 40 | *.tli 41 | *.tlh 42 | *.tmp 43 | *.log 44 | *.vspscc 45 | *.vssscc 46 | .builds 47 | 48 | # Visual C++ cache files 49 | ipch/ 50 | *.aps 51 | *.ncb 52 | *.opensdf 53 | *.sdf 54 | 55 | # Visual Studio profiler 56 | *.psess 57 | *.vsp 58 | *.vspx 59 | 60 | # Guidance Automation Toolkit 61 | *.gpState 62 | 63 | # ReSharper is a .NET coding add-in 64 | _ReSharper* 65 | 66 | # NCrunch 67 | *.ncrunch* 68 | .*crunch*.local.xml 69 | 70 | # Installshield output folder 71 | [Ee]xpress 72 | 73 | # DocProject is a documentation generator add-in 74 | DocProject/buildhelp/ 75 | DocProject/Help/*.HxT 76 | DocProject/Help/*.HxC 77 | DocProject/Help/*.hhc 78 | DocProject/Help/*.hhk 79 | DocProject/Help/*.hhp 80 | DocProject/Help/Html2 81 | DocProject/Help/html 82 | 83 | # Click-Once directory 84 | publish 85 | 86 | # Publish Web Output 87 | *.Publish.xml 88 | 89 | # NuGet Packages Directory 90 | packages 91 | 92 | # Windows Azure Build Output 93 | csx 94 | *.build.csdef 95 | 96 | # Windows Store app package directory 97 | AppPackages/ 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | [Tt]est[Rr]esult* 105 | *.Cache 106 | ClientBin 107 | [Ss]tyle[Cc]op.* 108 | ~$* 109 | *.dbmdl 110 | .DS_Store 111 | Generated_Code #added for RIA/Silverlight projects 112 | 113 | # Backup & report files from converting an old project file to a newer 114 | # Visual Studio version. Backup files are not needed, because we have git ;-) 115 | _UpgradeReport_Files/ 116 | Backup*/ 117 | UpgradeLog*.XML 118 | -------------------------------------------------------------------------------- /Details.md: -------------------------------------------------------------------------------- 1 | [Auth0](http://auth0.com) is a cloud service that works as a Single Sign On hub between your apps and authentication sources. By adding Auth0 to your Xamarin app you can: 2 | 3 | * Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, 37Signals**, or enterprise identity systems like **Windows Azure AD, Google Apps, AD, ADFS or any SAML Identity Provider**. 4 | * Add authentication through more traditional [username/password databases](https://docs.auth0.com/mysql-connection-tutorial). 5 | * Add support for [linking different user accounts](https://docs.auth0.com/link-accounts) with the same user. 6 | * Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely. 7 | * Support for integrating with third party APIs **(AWS, Windows Azure Mobile Services, Firebase, Salesforce, and more!)**. 8 | * Analytics of how, when and where users are logging in. 9 | * Pull data from other sources and add it to the user profile, through [JavaScript rules](https://docs.auth0.com/rules). 10 | 11 | The library is cross-platform, so once you learn it on iOS, you're all set on Android. 12 | 13 | ## Authentication with Widget 14 | 15 | ```csharp 16 | using Auth0.SDK; 17 | 18 | var auth0 = new Auth0Client( 19 | "{domain}", 20 | "{clientID}"); 21 | 22 | // 'this' could be a Context object (Android) or UIViewController, UIView, UIBarButtonItem (iOS) 23 | var user = await auth0.LoginAsync(this); 24 | /* 25 | - get user email => user.Profile["email"].ToString() 26 | - get facebook/google/twitter/etc access token => user.Profile["identities"][0]["access_token"] 27 | - get Windows Azure AD groups => user.Profile["groups"] 28 | - etc. 29 | */ 30 | ``` 31 | 32 | * In order to request a `refresh token`, use `auth0.LoginAsync(this, withRefreshToken: true)` ([see details](https://auth0.com/docs/refresh-token)). 33 | * You can obtain the `{domain}` and `{clientID}` from your application's settings page on the Auth0 Dashboard. You need to subscribe to Auth0 to get these values. The sample will not work with invalid or missing parameters. You can get a free subscription for testing and evaluation. 34 | 35 | ## Authentication with your own UI 36 | 37 | ```csharp 38 | var user = await auth0.LoginAsync(this, "google-oauth2"); // connection name here 39 | ``` 40 | 41 | * connection names can be found on Auth0 dashboard. E.g.: `facebook`, `linkedin`, `somegoogleapps.com`, `saml-protocol-connection`, etc. 42 | 43 | ## Authentication with specific user name and password 44 | 45 | ```csharp 46 | var user = await auth0.LoginAsync( 47 | "sql-azure-database", // connection name here 48 | "jdoe@foobar.com", // user name 49 | "1234"); // password 50 | ``` 51 | 52 | Get more details on [our Xamarin tutorial](https://docs.auth0.com/xamarin-tutorial). 53 | 54 | ## Delegation Token Request 55 | 56 | You can obtain a delegation token specifying the ID of the target client (`targetClientId`) and, optionally, an `IDictionary` object (`options`) in order to include custom parameters like scope or id_token: 57 | 58 | ```csharp 59 | var options = new Dictionary 60 | { 61 | { "scope", "openid name email picture" }, // default: openid 62 | }; 63 | 64 | var result = await auth0.GetDelegationToken( 65 | targetClientId: "{TARGET_CLIENT_ID}", // defaults to: "" 66 | idToken: "{USER_ID_TOKEN}", // defaults to: id_token of the authenticated user (auth0 CurrentUser.IdToken) 67 | options: options); 68 | 69 | // id_token available throug result["id_token"] 70 | ``` 71 | 72 | ## Renew id_token if not expired 73 | 74 | If the id_token of the logged in user has not expired (["exp" claim](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#expDef)) you can renew it by calling: 75 | 76 | ```csharp 77 | var options = new Dictionary 78 | { 79 | { "scope", "openid name email picture" }, // default: passthrough i.e. same as previous time token was asked for 80 | }; 81 | 82 | auth0.RenewIdToken(options: options); 83 | ``` 84 | 85 | ## Checking if the id_token has expired 86 | 87 | You can check if the `id_token` for the current user has expired using the following code: 88 | 89 | ```csharp 90 | bool expired = auth0.HasTokenExpired(); 91 | ``` 92 | 93 | If you want to check if a different `id_token` has expired you can use this snippet: 94 | ```csharp 95 | string idToken = // get if from somewhere... 96 | bool expired = TokenValidator.HasTokenExpired(idToken); 97 | ``` 98 | 99 | ## Refresh id_token using refresh_token 100 | 101 | You can obtain a `refresh_token` which **never expires** (unless explicitly revoked) and use it to renew the `id_token`. 102 | 103 | To do that you need to first explicitly request it when logging in: 104 | 105 | ```csharp 106 | var user = await auth0.LoginAsync(this, withRefreshToken: true); 107 | var refreshToken = user.RefreshToken; 108 | ``` 109 | 110 | You should store that token in a safe place. The next time, instead of asking the user to log in you will be able to use the following code to get the `id_token`: 111 | 112 | ```csharp 113 | var refreshToken = // retrieve from safe place 114 | var result = await auth0.RefreshToken(refreshToken); 115 | // access to result["id_token"]; 116 | ``` 117 | -------------------------------------------------------------------------------- /GettingStarted.md: -------------------------------------------------------------------------------- 1 | This tutorial explains how to integrate [Auth0](http://auth0.com) with a Xamarin application (iOS or Android). Auth0 helps you: 2 | 3 | * Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, 37Signals**, or enterprise identity systems like **Windows Azure AD, Google Apps, AD, ADFS or any SAML Identity Provider**. 4 | * Add authentication through more traditional [username/password databases](https://docs.auth0.com/mysql-connection-tutorial). 5 | * Add support for [linking different user accounts](https://docs.auth0.com/link-accounts) with the same user. 6 | * Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely. 7 | * Support for integrating with third party APIs **(AWS, Windows Azure Mobile Services, Firebase, Salesforce, and more!)**. 8 | * Analytics of how, when and where users are logging in. 9 | * Pull data from other sources and add it to the user profile, through [JavaScript rules](https://docs.auth0.com/rules). 10 | 11 | The library is cross-platform, so once you learn it on iOS, you're all set on Android. 12 | 13 | ## Create a free account in Auth0 14 | 15 | 1. Go to [Auth0](http://auth0.com) and click Sign Up. 16 | 2. Create a new Application from dashboard. 17 | 3. Go to the Application Settings section and make sure that __Allowed Callback URLs__ has the following value: `https://{YOUR_AUTH0_DOMAIN}/mobile` 18 | 19 | There are three options to do the integration: 20 | 21 | 1. Using the [Auth0 Lock](https://docs.auth0.com/lock) widget inside a Web View (this is the simplest with only a few lines of code required). 22 | 2. Creating your own UI (more work, but higher control the UI and overall experience). 23 | 3. Using specific user name and password. 24 | 25 | ## Option 1: Authentication using Login Widget 26 | 27 | To start with, we'd recommend using the __Auth0 Lock__ widget. Here is a snippet of code to copy & paste on your project: 28 | 29 | ```csharp 30 | using Auth0.SDK; 31 | 32 | var auth0 = new Auth0Client( 33 | "{domain}", 34 | "{clientID}"); 35 | 36 | // 'this' could be a Context object (Android) or UIViewController, UIView, UIBarButtonItem (iOS) 37 | var user = await auth0.LoginAsync(this); 38 | /* 39 | - get user email => user.Profile["email"].ToString() 40 | - get facebook/google/twitter/etc access token => user.Profile["identities"][0]["access_token"] 41 | - get Windows Azure AD groups => user.Profile["groups"] 42 | - etc. 43 | */ 44 | ``` 45 | 46 | * In order to request a `refresh token`, use `auth0.LoginAsync(this, withRefreshToken: true)` ([see details](https://auth0.com/docs/refresh-token)). 47 | * You can obtain the `{domain}` and `{clientID}` from your application's settings page on the Auth0 Dashboard. You need to subscribe to Auth0 to get these values. The sample will not work with invalid or missing parameters. You can get a free subscription for testing and evaluation at . 48 | * `Xamarin.Auth0Client` is built on top of the `WebRedirectAuthenticator` in the `Xamarin.Auth` component. All rules for standard authenticators apply regarding how the UI will be displayed. 49 | 50 | ![](https://cdn.auth0.com/docs/img/xamarin.auth0client.png) 51 | 52 | ## Option 2: Authentication with your own UI 53 | 54 | If you know which identity provider you want to use, you can add a `connection` parameter to the constructor and the user will be sent straight to the specified `connection`: 55 | 56 | ```csharp 57 | var user = await auth0.LoginAsync(this, "google-oauth2"); // connection name here 58 | ``` 59 | 60 | * connection names can be found on Auth0 dashboard. E.g.: `facebook`, `linkedin`, `somegoogleapps.com`, `saml-protocol-connection`, etc. 61 | 62 | ## Option 3: Authentication with specific user name and password (only for providers that support this) 63 | 64 | ```csharp 65 | var user = await auth0.LoginAsync( 66 | "sql-azure-database", // connection name here 67 | "jdoe@foobar.com", // user name 68 | "1234"); // password 69 | ``` 70 | 71 | * Providers supporting username/password auth are currently: Databases, Google, AD, ADFS 72 | 73 | ## Accessing user information 74 | 75 | The `Auth0User` has the following properties: 76 | 77 | * `Profile`: returns a `Newtonsoft.Json.Linq.JObject` object (from [Json.NET component](http://components.xamarin.com/view/json.net/)) containing all available user attributes (e.g.: `user.Profile["email"].ToString()`). 78 | * `IdToken`: is a Json Web Token (JWT) containing all of the user attributes and it is signed with your client secret. This is useful to call your APIs and flow the user identity. 79 | * `Auth0AccessToken`: the `access_token` that can be used to access Auth0's API. You would use this for example to [link user accounts](https://docs.auth0.com/link-accounts). 80 | 81 | --- 82 | 83 | ## Running the samples 84 | Samples should run out of the box because they use DEMO keys. 85 | 86 | > If you want to use your own credentials, [here](https://github.com/auth0/Xamarin.Auth0Client/blob/master/samples/README.md) is a short tutorial on how to do it. 87 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Auth0, Inc. (http://auth0.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xamarin.Auth0Client 2 | 3 | ## Deprecation Notice 4 | 5 | This library has been deprecated. To use Auth0 in your Xamarin app, please see the [Xamarin Quickstart](https://auth0.com/docs/quickstart/native/xamarin), and also the new [Auth0 OIDC Client](https://github.com/auth0/auth0-oidc-client-net) which supports both iOS and Android. 6 | 7 | ## Overview 8 | 9 | A cross-platform API for authenticating users with the [Auth0 platform](http://auth0.com). 10 | * This component builds on top of the [Xamarin.Auth](https://github.com/xamarin/Xamarin.Auth) framework. 11 | * Please read [Getting Started](https://github.com/auth0/Xamarin.Auth0Client/blob/master/GettingStarted.md) to learn how to use the library. 12 | 13 | ## Generate and publish new Xamarin Component 14 | 15 | 1. Build __Xamarin.Auth0Client.sln__ solution (with __RELEASE mode__) 16 | 2. Download the [xamarin-component command line tool](https://components.xamarin.com/submit/xpkg) and run the following script (replacing `Auth0Client-X.Y.xam` with specific version number): 17 | 18 | ``` 19 | mono xamarin-component.exe create-manually Auth0Client-X.Y.Z.xam \ 20 | --name="Auth0 SDK" \ 21 | --summary="Add authentication with different sources, either social like Google, Facebook, Twitter, or enterprise like WAAD, Google Apps, AD, ADFS or any SAML Provider." \ 22 | --publisher="Auth0" \ 23 | --website="http://auth0.com" \ 24 | --details="Details.md" \ 25 | --license="LICENSE" \ 26 | --getting-started="GettingStarted.md" \ 27 | --icon="icons/Auth0Client_128x128.png" \ 28 | --icon="icons/Auth0Client_512x512.png" \ 29 | --library="ios":"src/Auth0Client.iOS/bin/classic/Release/Auth0Client.iOS.dll" \ 30 | --library="ios-unified":"src/Auth0Client.iOS/bin/unified/Release/Auth0Client.iOS.dll" \ 31 | --library="android":"src/Auth0Client.Android/bin/Release/Auth0Client.Android.dll" \ 32 | --library="ios":"src/Auth0Client.iOS/bin/classic/Release/Xamarin.Auth.iOS.dll" \ 33 | --library="ios-unified":"src/Auth0Client.iOS/bin/unified/Release/Xamarin.Auth.iOS.dll" \ 34 | --library="android":"src/Auth0Client.Android/bin/Release/Xamarin.Auth.Android.dll" \ 35 | --library="ios":"src/Auth0Client.iOS/bin/classic/Release/Newtonsoft.Json.dll" \ 36 | --library="ios-unified":"src/Auth0Client.iOS/bin/unified/Release/Newtonsoft.Json.dll" \ 37 | --library="android":"src/Auth0Client.Android/bin/Release/Newtonsoft.Json.dll" \ 38 | --sample="iOS Sample (Classic). Demonstrates Auth0 authentication on iOS (Classic).":"./Xamarin.Auth0Client.iOS.Sample-Classic.sln" \ 39 | --sample="iOS Sample (Unified API). Demonstrates Auth0 authentication on iOS (Unified API).":"./Xamarin.Auth0Client.iOS.Sample.sln" \ 40 | --sample="Android Sample. Demonstrates Auth0 authentication on Android.":"./Xamarin.Auth0Client.Android.Sample.sln" 41 | ``` 42 | 43 | > For detailed instructions, see the [component packaging guidelines](https://components.xamarin.com/guidelines). 44 | 45 | * This will create a component package named __Auth0Client-X.Y.Z.xam__, which will include libraries and samples for iOS and Android, along with the required supplementary files. 46 | * You are ready to upload the new `Auth0Client-X.Y.Z.xam` package to https://components.xamarin.com/admin/new/877 47 | 48 | ## Issue Reporting 49 | 50 | If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. 51 | 52 | ## Author 53 | 54 | [Auth0](auth0.com) 55 | 56 | ## License 57 | 58 | This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. 59 | -------------------------------------------------------------------------------- /Xamarin.Auth0Client.Android.Sample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.Android.Sample", "samples\Auth0Client.Android.Sample\Auth0Client.Android.Sample.csproj", "{2E357FDF-1597-4530-A1D1-D6C6719CECBF}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.Android", "src\Auth0Client.Android\Auth0Client.Android.csproj", "{81864EA2-C020-4B1F-82E5-0634DD071084}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2E357FDF-1597-4530-A1D1-D6C6719CECBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2E357FDF-1597-4530-A1D1-D6C6719CECBF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2E357FDF-1597-4530-A1D1-D6C6719CECBF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2E357FDF-1597-4530-A1D1-D6C6719CECBF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(MonoDevelopProperties) = preSolution 24 | StartupItem = samples\Auth0Client.Android.Sample\Auth0Client.Android.Sample.csproj 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /Xamarin.Auth0Client.iOS.Sample-Classic.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS", "src\Auth0Client.iOS\Auth0Client.iOS-Classic.csproj", "{6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS.Sample", "samples\Auth0Client.iOS.Sample\Auth0Client.iOS.Sample-Classic.csproj", "{AEABCA29-E9F7-4C17-B25F-3C207827C143}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 11 | Release|iPhoneSimulator = Release|iPhoneSimulator 12 | Debug|iPhone = Debug|iPhone 13 | Release|iPhone = Release|iPhone 14 | Ad-Hoc|iPhone = Ad-Hoc|iPhone 15 | AppStore|iPhone = AppStore|iPhone 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU 19 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU 20 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.ActiveCfg = Release|Any CPU 21 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.Build.0 = Release|Any CPU 22 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.ActiveCfg = Debug|Any CPU 23 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.Build.0 = Debug|Any CPU 24 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 25 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 26 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.ActiveCfg = Release|Any CPU 27 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.Build.0 = Release|Any CPU 28 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 29 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 30 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone 31 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone 32 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.AppStore|iPhone.ActiveCfg = AppStore|iPhone 33 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.AppStore|iPhone.Build.0 = AppStore|iPhone 34 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhone.ActiveCfg = Debug|iPhone 35 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhone.Build.0 = Debug|iPhone 36 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 37 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 38 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhone.ActiveCfg = Release|iPhone 39 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhone.Build.0 = Release|iPhone 40 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 41 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 42 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone 43 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone 44 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.AppStore|iPhone.ActiveCfg = AppStore|iPhone 45 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.AppStore|iPhone.Build.0 = AppStore|iPhone 46 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhone.ActiveCfg = Debug|iPhone 47 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhone.Build.0 = Debug|iPhone 48 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 49 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 50 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhone.ActiveCfg = Release|iPhone 51 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhone.Build.0 = Release|iPhone 52 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 53 | {AEABCA29-E9F7-4C17-B25F-3C207827C143}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 54 | EndGlobalSection 55 | GlobalSection(MonoDevelopProperties) = preSolution 56 | StartupItem = samples\Auth0Client.iOS.Sample\Auth0Client.iOS.Sample-Classic.csproj 57 | EndGlobalSection 58 | EndGlobal 59 | -------------------------------------------------------------------------------- /Xamarin.Auth0Client.iOS.Sample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS", "src\Auth0Client.iOS\Auth0Client.iOS.csproj", "{6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS.Sample", "samples\Auth0Client.iOS.Sample\Auth0Client.iOS.Sample.csproj", "{AEABCA29-E9F7-4C17-B25F-3C207827C144}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 11 | Release|iPhoneSimulator = Release|iPhoneSimulator 12 | Debug|iPhone = Debug|iPhone 13 | Release|iPhone = Release|iPhone 14 | Ad-Hoc|iPhone = Ad-Hoc|iPhone 15 | AppStore|iPhone = AppStore|iPhone 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU 19 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU 20 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.ActiveCfg = Release|Any CPU 21 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.Build.0 = Release|Any CPU 22 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.ActiveCfg = Debug|Any CPU 23 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.Build.0 = Debug|Any CPU 24 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 25 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 26 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.ActiveCfg = Release|Any CPU 27 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.Build.0 = Release|Any CPU 28 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 29 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 30 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone 31 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone 32 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.AppStore|iPhone.ActiveCfg = AppStore|iPhone 33 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.AppStore|iPhone.Build.0 = AppStore|iPhone 34 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Debug|iPhone.ActiveCfg = Debug|iPhone 35 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Debug|iPhone.Build.0 = Debug|iPhone 36 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 37 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 38 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Release|iPhone.ActiveCfg = Release|iPhone 39 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Release|iPhone.Build.0 = Release|iPhone 40 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 41 | {AEABCA29-E9F7-4C17-B25F-3C207827C144}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 42 | EndGlobalSection 43 | GlobalSection(MonoDevelopProperties) = preSolution 44 | Policies = $0 45 | $0.TextStylePolicy = $1 46 | $1.inheritsSet = null 47 | $1.scope = text/x-csharp 48 | $0.CSharpFormattingPolicy = $2 49 | $2.AfterDelegateDeclarationParameterComma = True 50 | $2.inheritsSet = Mono 51 | $2.inheritsScope = text/x-csharp 52 | $2.scope = text/x-csharp 53 | $0.TextStylePolicy = $3 54 | $3.FileWidth = 120 55 | $3.TabsToSpaces = False 56 | $3.inheritsSet = VisualStudio 57 | $3.inheritsScope = text/plain 58 | $3.scope = text/plain 59 | EndGlobalSection 60 | EndGlobal 61 | -------------------------------------------------------------------------------- /Xamarin.Auth0Client.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS", "src\Auth0Client.iOS\Auth0Client.iOS.csproj", "{6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.iOS-Classic", "src\Auth0Client.iOS\Auth0Client.iOS-Classic.csproj", "{73FADD05-A3BA-48A1-BB03-EAA19CA9782B}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0Client.Android", "src\Auth0Client.Android\Auth0Client.Android.csproj", "{81864EA2-C020-4B1F-82E5-0634DD071084}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|iPhone = Debug|iPhone 14 | Release|Any CPU = Release|Any CPU 15 | Release|iPhone = Release|iPhone 16 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 17 | Release|iPhoneSimulator = Release|iPhoneSimulator 18 | Ad-Hoc|iPhone = Ad-Hoc|iPhone 19 | AppStore|iPhone = AppStore|iPhone 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU 23 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU 24 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.ActiveCfg = Debug|Any CPU 25 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.AppStore|iPhone.Build.0 = Debug|Any CPU 26 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.ActiveCfg = Debug|Any CPU 29 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhone.Build.0 = Debug|Any CPU 30 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 31 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 32 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.ActiveCfg = Release|Any CPU 35 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhone.Build.0 = Release|Any CPU 36 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 37 | {6D7BCBB4-FA0D-44E6-BFA3-89D166F4DDCB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 38 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU 39 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU 40 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.AppStore|iPhone.ActiveCfg = Debug|Any CPU 41 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.AppStore|iPhone.Build.0 = Debug|Any CPU 42 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Debug|iPhone.ActiveCfg = Debug|Any CPU 45 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 46 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 47 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Release|Any CPU.ActiveCfg = Release|Any CPU 48 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Release|Any CPU.Build.0 = Release|Any CPU 49 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Release|iPhone.ActiveCfg = Release|Any CPU 50 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 51 | {73FADD05-A3BA-48A1-BB03-EAA19CA9782B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 52 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU 53 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU 54 | {81864EA2-C020-4B1F-82E5-0634DD071084}.AppStore|iPhone.ActiveCfg = Debug|Any CPU 55 | {81864EA2-C020-4B1F-82E5-0634DD071084}.AppStore|iPhone.Build.0 = Debug|Any CPU 56 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 57 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|Any CPU.Build.0 = Debug|Any CPU 58 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|iPhone.ActiveCfg = Debug|Any CPU 59 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|iPhone.Build.0 = Debug|Any CPU 60 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 61 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 62 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|Any CPU.ActiveCfg = Release|Any CPU 63 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|Any CPU.Build.0 = Release|Any CPU 64 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|iPhone.ActiveCfg = Release|Any CPU 65 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|iPhone.Build.0 = Release|Any CPU 66 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 67 | {81864EA2-C020-4B1F-82E5-0634DD071084}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 68 | EndGlobalSection 69 | EndGlobal 70 | -------------------------------------------------------------------------------- /icons/Auth0Client_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auth0/Xamarin.Auth0Client/672373b3c45af888e4a1839a70c79d27b89305da/icons/Auth0Client_128x128.png -------------------------------------------------------------------------------- /icons/Auth0Client_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auth0/Xamarin.Auth0Client/672373b3c45af888e4a1839a70c79d27b89305da/icons/Auth0Client_512x512.png -------------------------------------------------------------------------------- /samples/Auth0Client.Android.Sample/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /samples/Auth0Client.Android.Sample/Auth0Client.Android.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {2E357FDF-1597-4530-A1D1-D6C6719CECBF} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Auth0Client.Android.Sample 12 | Resources 13 | Assets 14 | Resource 15 | True 16 | Resources\Resource.designer.cs 17 | Auth0Client.Android.Sample 18 | Properties\AndroidManifest.xml 19 | v2.3 20 | 21 | 22 | true 23 | false 24 | bin\Debug 25 | DEBUG; 26 | prompt 27 | 4 28 | false 29 | None 30 | 31 | 32 | true 33 | bin\Release 34 | prompt 35 | 4 36 | false 37 | false 38 | armeabi-v7a 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ..\..\packages\Newtonsoft.Json.6.0.8\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | {81864EA2-C020-4B1F-82E5-0634DD071084} 69 | Auth0Client.Android 70 | 71 | 72 | -------------------------------------------------------------------------------- /samples/Auth0Client.Android.Sample/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Android.App; 4 | using Android.Content; 5 | using Android.OS; 6 | using Android.Runtime; 7 | using Android.Views; 8 | using Android.Widget; 9 | using Auth0.SDK; 10 | using Newtonsoft.Json.Linq; 11 | 12 | namespace Auth0Client.Android.Sample 13 | { 14 | [Activity (Label = "Auth0Client - Android Sample", MainLauncher = true)] 15 | public class MainActivity : Activity 16 | { 17 | // ********** 18 | // IMPORTANT: these are demo credentials, and the settings will be reset periodically 19 | // You can obtain your own at https://auth0.com when creating a Xamarin App in the dashboard 20 | // *********** 21 | private Auth0.SDK.Auth0Client client = new Auth0.SDK.Auth0Client ( 22 | "contoso.auth0.com", 23 | "HmqDkk9qtDgxsiSKpLKzc51xD75hgiRW"); 24 | 25 | private ProgressDialog progressDialog; 26 | 27 | protected override void OnCreate (Bundle bundle) 28 | { 29 | base.OnCreate (bundle); 30 | this.SetContentView(Resource.Layout.Main); 31 | 32 | this.progressDialog = new ProgressDialog (this); 33 | this.progressDialog.SetMessage ("loading..."); 34 | 35 | var loginWithWidget = this.FindViewById