├── AccountManagement ├── CrossAccounts.cs ├── AuthyAccount.cs ├── IAccountManagerService.cs └── AuthorizePage.cs ├── iOS ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Entitlements.plist ├── Main.cs ├── AppDelegate.cs ├── app.config ├── packages.config ├── LaunchScreen.storyboard ├── Info.plist └── Authy.iOS.csproj ├── Droid ├── Resources │ ├── drawable │ │ └── icon.png │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-xxhdpi │ │ └── icon.png │ ├── layout │ │ ├── Toolbar.axml │ │ └── Tabbar.axml │ ├── values │ │ └── styles.xml │ └── AboutResources.txt ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── app.config ├── packages.config └── Authy.Droid.csproj ├── App.xaml ├── ProfilePage.xaml ├── app.config ├── .gitignore ├── App.xaml.cs ├── ProfilePage.xaml.cs ├── AuthyPage.xaml ├── Authy.Shared ├── Authy.Shared.projitems ├── Authy.Shared.shproj └── AccountManagement │ ├── AccountManagementImplementation.cs │ └── AuthorizePageRenderer.cs ├── packages.config ├── Properties └── AssemblyInfo.cs ├── LoggingHandler.cs ├── Keys.cs ├── Authy.sln ├── Authy.csproj └── AuthyPage.xaml.cs /AccountManagement/CrossAccounts.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/Authy/master/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/Authy/master/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/Authy/master/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/Authy/master/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AccountManagement/AuthyAccount.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace Authy.AccountManagement 3 | { 4 | public class AuthyAccount 5 | { 6 | string _value; 7 | public AuthyAccount(string sth) 8 | { 9 | _value = sth; 10 | } 11 | 12 | public override string ToString() 13 | { 14 | return _value; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | com.thatcsharpguy.authy 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ProfilePage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AccountManagement/IAccountManagerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Authy.AccountManagement 5 | { 6 | public interface IAccountManagerService 7 | { 8 | 9 | List Accounts { get; } 10 | 11 | string GetPropertyFromAccount(Services service, string property); 12 | 13 | void EraseAll(); 14 | 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /AccountManagement/AuthorizePage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Authy.AccountManagement 5 | { 6 | public enum Services 7 | { 8 | GitHub, 9 | Facebook, 10 | Twitter, 11 | // 12 | } 13 | 14 | public class AuthorizePage : ContentPage 15 | { 16 | public Services Service { get; private set; } 17 | 18 | public AuthorizePage(Services service) 19 | { 20 | Service = service; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace Authy.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Autosave files 2 | *~ 3 | 4 | # build 5 | [Oo]bj/ 6 | [Bb]in/ 7 | packages/ 8 | Components/ 9 | TestResults/ 10 | 11 | # globs 12 | Makefile.in 13 | *.DS_Store 14 | *.sln.cache 15 | *.suo 16 | *.cache 17 | *.pidb 18 | *.userprefs 19 | *.usertasks 20 | config.log 21 | config.make 22 | config.status 23 | aclocal.m4 24 | install-sh 25 | autom4te.cache/ 26 | *.user 27 | *.tar.gz 28 | tarballs/ 29 | test-results/ 30 | Thumbs.db 31 | 32 | # Mac bundle stuff 33 | *.dmg 34 | *.app 35 | 36 | # resharper 37 | *_Resharper.* 38 | *.Resharper 39 | 40 | # dotCover 41 | *.dotCover 42 | -------------------------------------------------------------------------------- /iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Authy.iOS.AccountManagement; 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace Authy.iOS 9 | { 10 | [Register("AppDelegate")] 11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 12 | { 13 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 14 | { 15 | global::Xamarin.Forms.Forms.Init(); 16 | AccountManagementImplementation.Init(); 17 | 18 | LoadApplication(new App()); 19 | 20 | return base.FinishedLaunching(app, options); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Droid/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 your 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"); 20 | -------------------------------------------------------------------------------- /App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | using Authy.AccountManagement; 5 | 6 | namespace Authy 7 | { 8 | public partial class App : Application 9 | { 10 | public App() 11 | { 12 | InitializeComponent(); 13 | 14 | IsLogged = false; 15 | 16 | MainPage = new NavigationPage(new AuthyPage()); 17 | } 18 | 19 | public static bool IsLogged; 20 | 21 | public const string AppName = "Authy"; 22 | 23 | protected override void OnStart() 24 | { 25 | // Handle when your app starts 26 | } 27 | 28 | protected override void OnSleep() 29 | { 30 | // Handle when your app sleeps 31 | } 32 | 33 | protected override void OnResume() 34 | { 35 | // Handle when your app resumes 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ProfilePage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Authy.AccountManagement; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | using Xamarin.Forms; 9 | 10 | namespace Authy 11 | { 12 | public partial class ProfilePage : ContentPage 13 | { 14 | public ProfilePage(Services service) 15 | { 16 | InitializeComponent(); 17 | Title = service.ToString(); 18 | } 19 | 20 | 21 | public ProfilePage(Services service, string name, string image) 22 | { 23 | InitializeComponent(); 24 | Title = service.ToString(); 25 | ProfileImage.Source = image; 26 | LoginName.Text = name; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /AuthyPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |