none
Checking online account username and password

    Question

  • I was working on a project, and I wasn't sure if there was an simple way to check if login info is right? I'm making a account checker for your apple ID (www.apple.com), and I was looking for a simple way to check if the account username and password is right.
    Friday, March 31, 2017 2:27 AM

All replies

  • I cannot understand your intention why you want to know account username and password.
    If you are a valid user in some system, you must know your username and password.
    Do you want to know others' username and password?  If so, it should not be done.
    Friday, March 31, 2017 6:30 AM
  • Hi TimeFluid,

    According to your description, I guess that you want to create one login system and check account username and password before user login, I’m right? If yes, I do a simple sample, please refer to.
    Code sample:

    Private errorcount As Integer = 0
        
    
        Private Sub Form1_Load(sender As Object, e As EventArgs)
    
       End Sub
    
        Private Sub button2_Click(sender As Object, e As EventArgs)
            Dim strconnectstring As String
    
            If textBox1.Text = "" OrElse textBox2.Text = "" Then
                MessageBox.Show("Error Info:", "Please Enter your username and Password!", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
            Else
                strconnectstring = "Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\C# and VB Support\VB(Demo)\VB(Demo)\Database1.mdf;Integrated Security=True;Integrated Security=True"
                Dim sql As String = "select * from LoginDate where Username=@Username and Password=@Password"
    
                Using con As New SqlConnection(strconnectstring)
                    Try
                        con.Open()
                        MessageBox.Show("OK")
                        Using cmd As New SqlCommand(sql, con)
                            cmd.Parameters.AddWithValue("@UserName", textBox1.Text)
                            cmd.Parameters.AddWithValue("@Password", textBox2.Text)
                            Dim reader As SqlDataReader = cmd.ExecuteReader()
                            If reader.HasRows Then
                                MessageBox.Show("OK!")
                            Else
                                MessageBox.Show("Error Info:", "Incorrect UserName and Password", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation)
                                errorcount = errorcount + 1
                                textBox1.Text = ""
                                textBox2.Text = ""
                                textBox1.Focus()
                                If errorcount = 1 Then
                                    label4.Text = "you have 2 login change"
                                ElseIf errorcount = 2 Then
                                    label4.Text = "you have 1 login change"
                                ElseIf errorcount = 3 Then
    
                                    MessageBox.Show(" You have exceeded the maximum login attempts. System is now exiting. ", " Error! ", MessageBoxButtons.OK, MessageBoxIcon.[Error])
    
                                End If
                            End If
                        End Using
                    Catch ex As Exception
                        MessageBox.Show(ex.Message)
                    End Try
                End Using
            End If
        End Sub
    
        Private Sub button1_Click(sender As Object, e As EventArgs)
            MessageBox.Show("Error Info:", "Exixt", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation)
            Me.Close()
        End Sub
    

    More detailed info, please refer to this article.

    Best Regards,

    Cherry Bu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 31, 2017 7:14 AM
    Moderator
  • @Cherry,

    The OP asks about an ID checker for Apple.Com

    What you show is an application completely not needed because for that is in Windows PC the system authentication.

    It is often given as school assignment because it is as old as Methuselah and from just before those days.  


    Success
    Cor


    Friday, March 31, 2017 11:08 AM
  • TimeFluid, 

    You ask here all kind of questions which have to do with Apple Development. 

    Now you ask how to get the Login ID, however, that is simple. 

    Login and as it fails you have 2 chances. The server is down or the ID password combination is wrong. 

    The same as with these forums. 

    However, if you want Apple Development information than the Apple site must be the place to ask. 

    https://developer.apple.com/support/


    Success
    Cor

    Friday, March 31, 2017 11:13 AM
  • No. I'm actually making a Apple tool for my cousin and I.
    Saturday, April 1, 2017 3:52 AM
  • Hi TimeFluid,

    Sorry for my misunderstanding of your intention/situation.

    Please consult Apple Developer Support, instead of MSDN, as Cor Ligthert mentioned.

    Regards,
    Ashidacchi
    Saturday, April 1, 2017 4:34 AM