I'm currently creating my own Launcher in VB.NET and everything is basically done except some small things as custom JVM arguments. I'm currently stuck at creating some sort of login function I have read a bit here: http://wiki.vg/Authentication I have one idea that might work, and that is to have some sort of PHP script that fetches the accesstoken. I do not have much experience in VB.NET I did this as an challenge to learn more. This is how it looks at the moment: https://gyazo.com/af17968c14658ce4ea433bfeb993204a Do anyone have any idea on how I should make my login function and if someone would like to help out / bring new ideas that would be great!
I managed to get it fixed if someone else needs login function for VB.net here you have it: Code (Text): Private ACCESS_TOKEN As String Public Function GetAccessToken() As String Return ACCESS_TOKEN End Function Public Sub ObtainAccessToken(username As String, password As String) Dim UUID As String = Guid.NewGuid.ToString() Dim httpWebRequest = DirectCast(WebRequest.Create("https://authserver.mojang.com/authenticate"), HttpWebRequest) httpWebRequest.ContentType = "application/json" httpWebRequest.Method = "POST" Using streamWriter = New StreamWriter(httpWebRequest.GetRequestStream()) Dim json As String = (Convert.ToString((Convert.ToString("{""agent"":{""name"":""Minecraft"",""version"":1},""username"":""") & username) + """,""password"":""") & password) + """,""clientToken"":" & ControlChars.Quote & UUID & ControlChars.Quote & "}" streamWriter.Write(json) streamWriter.Flush() streamWriter.Close() Dim httpResponse = DirectCast(httpWebRequest.GetResponse(), HttpWebResponse) Using streamReader = New StreamReader(httpResponse.GetResponseStream()) Dim result = streamReader.ReadToEnd() ACCESS_TOKEN = result MessageBox.Show(result) End Using End Using End Sub
I wholeheartedly agree with you but For whatever reason, I've been watching this thread since it was originally posted 2 years ago, and it's been a joy to read all the belated activity... but come on guys, this thread is ancient!