This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $i = 0 | |
| $metadata | |
| $metadataCounter = 0 | |
| $errorCounter = 0 | |
| $url = Read-Host "Enter LNURLp URL, e.g. https://wallet.paralelnipolis.cz/lnurlp/api/v1/lnurl/" | |
| while ($true) | |
| { | |
| try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // subscribe to auth state changes | |
| FirebaseUI.Instance.Client.AuthStateChanged += this.AuthStateChanged; | |
| private void AuthStateChanged(object sender, UserEventArgs e) | |
| { | |
| // the callback is not guaranteed to be on UI thread | |
| Application.Current.Dispatcher.Invoke(() => | |
| { | |
| if (e.User == null) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--WPF Sample--> | |
| <Page x:Class="Firebase.Auth.Wpf.Sample.LoginPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" | |
| xmlns:firebase="clr-namespace:Firebase.Auth.UI;assembly=Firebase.Auth.UI.WPF"> | |
| <Grid> | |
| <firebase:FirebaseUIControl> | |
| <firebase:FirebaseUIControl.Header> | |
| <!--Custom content shown above the provider buttons--> | |
| <TextBlock | |
| HorizontalAlignment="Center" | |
| Text="Hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Initialize FirebaseUI during your application startup (e.g. App.xaml.cs) | |
| FirebaseUI.Initialize(new FirebaseUIConfig | |
| { | |
| ApiKey = "<API KEY>", | |
| AuthDomain = "<DOMAIN>.firebaseapp.com", | |
| Providers = new FirebaseAuthProvider[] | |
| { | |
| new GoogleProvider().AddScopes("email"), | |
| new EmailProvider() | |
| // and others |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // user and auth properties | |
| var user = userCredential.User; | |
| var uid = user.Uid; | |
| var name = user.Info.DisplayName; // more properties are available in user.Info | |
| var refreshToken = user.Credential.RefreshToken; // more properties are available in user.Credential | |
| // user methods | |
| var token = await user.GetIdTokenAsync(); | |
| await user.DeleteAsync(); | |
| await user.ChangePasswordAsync("new_password"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // anonymous sign in | |
| var user = await client.SignInAnonymouslyAsync(); | |
| // sign up or sign in with email and password | |
| var userCredential = await client.CreateUserWithEmailAndPasswordAsync("email", "pwd", "Display Name"); | |
| var userCredential = await client.SignInWithEmailAndPasswordAsync("email", "pwd"); | |
| // sign in via provider specific AuthCredential | |
| var credential = TwitterProvider.GetCredential("access_token", "oauth_token_secret"); | |
| var userCredential = await client.SignInWithCredentialAsync(credential); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Firebase.Auth; | |
| using Firebase.Auth.Providers; | |
| using Firebase.Auth.Repository; | |
| // Configure... | |
| var config = new FirebaseAuthConfig | |
| { | |
| ApiKey = "<API KEY>", | |
| AuthDomain = "<DOMAIN>.firebaseapp.com", | |
| Providers = new FirebaseAuthProvider[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SamlAuthenticationOptions : RemoteAuthenticationOptions | |
| { | |
| public string AuthorizationEndpoint { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| // ... | |
| services | |
| .AddAuthentication() | |
| .AddGoogle(c => | |
| { | |
| c.ClientId = "xyz.apps.googleusercontent.com"; | |
| c.ClientSecret = "top-secret"; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void Screenshot(int order, string lng) | |
| { | |
| float scale = 1.75f; | |
| var size = new Size((int)(Screen.PrimaryScreen.WorkingArea.Width * scale), (int)(Screen.PrimaryScreen.WorkingArea.Height * scale)); | |
| using (var bitmap = new Bitmap(size.Width, size.Height)) | |
| { | |
| using (var g = Graphics.FromImage(bitmap)) | |
| { |
NewerOlder