Save Password Data AS IS in firebase realtime in xamarin form

UnknownXam 21 Reputation points
2022-12-08T11:21:55.77+00:00

My problem is, I have registration page and one of its field is password. Assume I enter..
Password: dummytext123

The data received in my firebase realtime is "Dummytext123"
My expected output is, whatever password Input by user it will reflect to database property as is, Example if customer input the password "john123" then in the db it will still "john123"

Or maybe for the long run I will put an restriction to my password rule like "password contains special char, upper and lower case, number and 8 maximum". So Examplem user/customer input the password "@DummyTest123" it will still reflect the same in the db.

By the way,this is my code;

async public void signButton_Clicked(System.Object sender, System.EventArgs e)  
        {  
  
        string pass = txtbox_Password.Text;  
         CUSTOMER cus = new CUSTOMER();  
         cus.CusPass = pass;  
  
         }  

This is my UI field.

 <Grid  
                                  BackgroundColor="Transparent"  
                                  HorizontalOptions="Start"   
                                  WidthRequest="257">  
                                <Entry   
                                Placeholder="Password"  
                                TextColor="Black"   
                                HorizontalOptions="FillAndExpand"  
                                Margin="0,0,0,0"   
                                PlaceholderColor="Black"   
                                x:Name="entryField_Password"  
                                Keyboard="Text"   
                                IsPassword="{Binding Source={x:Reference ShowPasswordActualTrigger2},   
                                 Path=HidePassword}"   
                                TextTransform="None"  
                               />  
                                <ImageButton  
                                    VerticalOptions="Center"   
                                    Margin="0,0,13,0"   
                                    HeightRequest="30 "  
                                    HorizontalOptions="End"   
                                    Source="hide_eye_password_new.png"   
                                    BackgroundColor="Transparent"   
                                    CornerRadius="0">  
                                    <ImageButton.Triggers>  
                                        <EventTrigger Event="Clicked">  
                                            <behavior:ShowPasswordTriggerAction   
                                                ShowIcon="eye_password_new.png"                           
                                                HideIcon="hide_eye_password_new.png"   
                                                x:Name="ShowPasswordActualTrigger2"/>  
                                        </EventTrigger>  
                                    </ImageButton.Triggers>  
                                      
                                </ImageButton>  
  
                            </Grid>  

Edit:
Base on @Rob Caplan - MSFT comemnt
Version information:

What version of Xamarin are you using?- Im using the latest one, I think its. Microsoft Visual Studio Community 2019
Version 16.11.13 and Microsoft .NET Framework Version 4.8.04084

On what platform (iOS, Android, Windows) and version of the platform do you see the problem?- The Platform I use is only Android and its target framework is .NET Standard 2.1

Does the problem occur only on that one platform or do you get the same behavior on multiple platforms?- Nope, since base on my answer above, It only occur in android.

Conversely, does this work the way you'd like it to on any known configurations? -nope sir, but I tried in my UI like this TextTransform="None" but still It wont resolve my problem.

Does it occur on different devices of the same platform? On an emulator?- In emulator only, also I tried to physical device which is my phone, still I encountered the problem.

Problem description

Where does the problem occur?- The problem occurs when I enter the needed field for customer create account,one of the field is "enter password" and hit "create button", user can create successfully and inserted to firebase realtime,however the problem is there.
Is the text already capitalized when you read it out of txtbox_Password.Text? Or does it get corrupted after being entered into the database?- nope, I entered my keyboard in all lower caps.

What type of control is txtbox_Password? -I edit my codes, in my UI.

Does the control have appropriate properties to be a password field?

Theory--
I read also the theory and maybe your correct sir.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,297 questions
{count} votes