C
C#13mo ago
Riles

❔ Log into minecraft with xbox/microsoft api

I was wondering how to authenticate a Minecraft account with Microsofts new account system and if there's a NUget package that could help
22 Replies
jcotton42
jcotton4213mo ago
@a_seal https://wiki.vg/ is your friend for this kind of stuff there's a page on authentication
Riles
Riles13mo ago
Thanks
Riles
Riles13mo ago
I'm here on the wiki: https://wiki.vg/Microsoft_Authentication_Scheme I created an application with microsoft azure but I have no idea what to do with this oauth2 authorization code flow
JakenVeina
JakenVeina13mo ago
what kind of app are you building?
Riles
Riles13mo ago
A launcher
JakenVeina
JakenVeina13mo ago
well, as the article mentions, it's all predicated on the idea of browser redirects so, if you're going to use code flow, you have to be able to launch a browser AS WELL AS receive a callback which means having an HTTP server, at least temporarily, as the article also mentions otherwise, there's an alternative "device code flow" both still require the user to visit Microsoft's website, in a browser, which is the core point of how OAuth works users don't authenticate themselves to you, they authenticate themselves to Microsoft, or whoever the OAuth provider is and then the provider confirms it for you
Riles
Riles13mo ago
Is this why i need to make a azure app
JakenVeina
JakenVeina13mo ago
yes
Riles
Riles13mo ago
ahh
JakenVeina
JakenVeina13mo ago
you have to tell Microsoft ahead of time that you intend to use its OAuth services for your app A) that gives them some amount of traceability for who's using their shit B) that makes you declare up-front what you're intending to use OAuth for, I.E. what permissions you need, which then gets passed on to the user for them to confirm whether it's okay C) that gives them the ability to immediately revoke your ability to use the OAuth system, in the event of a security breach or something, in the form of revoking your API key D) that gives you the same ability to "shut down" the app by revoking the API key
Riles
Riles13mo ago
this thing:
JakenVeina
JakenVeina13mo ago
yup that's Microsoft's website users give their password or whatever to Microsoft never to you ergo, they don't HAVE to trust that you're not doing anything nefarious with it, cause you never have the chance
Riles
Riles13mo ago
so the app gets an access token in the end, is that what I receive in order to log the players in?
JakenVeina
JakenVeina13mo ago
yes you get an access token in response to their login that access token allows you to access other Microsoft/Minecraft services, at least temporarily in your case, perhaps the only thing you need is to identify the user like, maybe call a GetUserInfo endpoint or maybe you need to retrieve like a session token to pass to the game when you launch it
Riles
Riles13mo ago
ye, how do I get the link for the OAuth that player put their credentials into
JakenVeina
JakenVeina13mo ago
you'll have to check documentation ideally, you'll retrieve it from Microsoft on the fly
Riles
Riles13mo ago
k thx
JakenVeina
JakenVeina13mo ago
one of the standards for doing all of this is the OpenIDConnect protocol
jcotton42
jcotton4213mo ago
that wiki.vg page tells you everything you need to know
JakenVeina
JakenVeina13mo ago
for which, the URL you retrieve all the info from is https://{oauth-provider-hostname}/.well-known/openid-configuration
Buddy
Buddy13mo ago
Why are so many doing launchers nowadays? I see it all the time here.
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ optimizationSincere question about optimization here... The RenderFirstTab() method is called in an infinite lo❔ How to instantiate derived class when base class requires args?Hey, I'll post the code below but I don't think it'll be necessary as I'm pretty sure I know what th❔ Not sure should I leave the automatic table alteration (postgres EF Core 3.0 to EF Core 6.0)You can see on the picture that EF Core has added some non intentional AlterColumn entries. I guess ❔ Writing VS Extension to Support Language with TextMate Grammar FileHello, I am trying to write extension to support BNF(Backus–Naur form) metalanguage files. I am try❔ Change trigger behavior from code behind(!)Hello again. I am still making a chess game using wpf&wcf. And the problem is that entire board is g❔ Getting SQL data from a relationship tableHello, for my school assignment I have to make a winforms app. Currently I have 3 tables in my SQL D❔ Fast Fourier Transform. I need to make app displaying image and result like ImageJImageJ: https://imagej.net/ij/ So i've chosen to make WPF app because im familiar with it and .NET i❔ ✅ I feel like I've gotten lost in what I'm doing right now, pls help.```cs public async Task DisplayUpdatedTicketsAsync(){ await UpdateTicketsAsync(); DisplayTic❔ How Configure Visual Studio to use webservice SOAP with .p12 certificateLet's see if someone can help me to connect SOAP with .pk certificate using visual studio, I'm alrea❔ About learning C# and Asp.net coreHello guys, i wanna ask something about learning path to web development with c#. I am learning C#