Coder Social home page Coder Social logo

`getTitleToken` does not work { doSisuAuth: false, authTitle: Titles.MinecraftJava, deviceType: "Win32" } about prismarine-auth HOT 6 CLOSED

prismarinejs avatar prismarinejs commented on June 26, 2024
`getTitleToken` does not work { doSisuAuth: false, authTitle: Titles.MinecraftJava, deviceType: "Win32" }

from prismarine-auth.

Comments (6)

LucienHH avatar LucienHH commented on June 26, 2024 1

Currently, custom Azure apps aren't really supported in prismarine-auth due to some scopes not being set correctly, we'd also need to account for the fact that the majority of custom Azure apps are unable to create title tokens. We could add a flag like customAzureApp: true to the options because I'm not sure how else we'd be able to distinguish.

from prismarine-auth.

extremeheat avatar extremeheat commented on June 26, 2024

Why are you setting this flag? What tokens are you seeking?

from prismarine-auth.

LucienHH avatar LucienHH commented on June 26, 2024

Just to chime in as well /examples/xbox/sisu.js has doSisuAuth set to true as it is needed for the Java titleId

from prismarine-auth.

AlphaBs avatar AlphaBs commented on June 26, 2024

I want to make a minecraft client that allows accounts under the age of 18 to log in and uses my azure app id.
but doSisuAuth does not work for my azure app id: docs

my real code looks like this (pseudocode):

const flow = new Authflow(id,cache, { doSisuAuth: false, authTitle: "<my-azure-app-id>", deviceType: 'Win32' })
const msaToken = loginWithMsalJs() // i used MSAL.js

userToken = flow.xbl.getUserToken(msaToken)
deviceToken = flow.xbl.getDeviceToken()
titleToken = flow.xblgetTitleToken(msaToken, deviceToken)
xstsToken = flow.xbl.getXSTSToken(userToken, deviceToken, titleToken)
mcToken = flow.mca.getAccessToken(xstsToken)

can I do like this?

from prismarine-auth.

extremeheat avatar extremeheat commented on June 26, 2024

The Windows app IDs and the Azure app IDs have different length (latter in UUID form) so that can be used to disambiguate. And yes, the privileges of an azure app usually means that full authentication cannot happen for XBL APIs. There is little reason to use them in favor of the current Minecraft* tokens unless you need it for some production thing. In which case we could use a PR. The only practical difference to the user is what the sign-in page lists as the app you sign in to..

from prismarine-auth.

LucienHH avatar LucienHH commented on June 26, 2024

Azure apps also have Windows app ids and can be substituted in and out, I think it'd be very rare to see someone use a custom Azure app with the Windows app ID but it does exist. I think it would be a useful addition as I'm sure there are a few people who use pauth just for XBL authentication and would find use in it.

from prismarine-auth.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.