这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@GameParrot
Copy link
Contributor

  • Support for new auth system when connecting to servers (TODO: support for offline logins and parsing the new token field)
  • new session.Session for reusing tokens between logins
  • new auth.XblTokenObtainer for reusing a device token
  • Support for authenticating with platforms other than Android

Copy link
Owner

@Sandertv Sandertv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I have taken a brief look and left a couple of comments, most of those are easily resolved.

I have some concerns over the session package, which I think is named rather unfortunately. By itself, session is not clear at all when it comes to what it refers to. session.Session does not make that any clearer. I think putting session.go in the auth package, so that referring to it becomes auth.Session, would be much more understandable and straightforward.

I am also not a huge fan of the franchise name for the respective package, since again, it isn't particularly clear to anyone unfamiliar with the code what this means. Is there any more concrete name we could give it? And is it so strongly related to authentication that it might be better placed within the auth package? (as a subpackage?)

@GameParrot GameParrot marked this pull request as ready for review September 4, 2025 10:40
Comment on lines +3 to +7
type Device struct {
ClientID string
DeviceType string
Version string
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document this

Copy link
Collaborator

@TwistedAsylumMC TwistedAsylumMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I caught everything, but it's mostly just missing documentation and grammer that's needed for this. As well as removing any test code (specifically main.go) and fixing up the last TODO. Would be great to get this merged, so let me know if you need any help


var discovered = map[string]*Discovery{}

func Discover(build string) (*Discovery, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

return result.Data, nil
}

type Discovery struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

SupportedEnvironments map[string][]string `json:"supportedEnvironments"`
}

func (d *Discovery) Environment(env Environment, typ string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

"golang.org/x/text/language"
)

type Session struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

return s, nil
}

func (s *Session) login(ctx context.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

return s.obtainMcToken(ctx)
}

func (s *Session) initDiscovery() error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

return nil
}

func (s *Session) loginWithPlayfab(ctx context.Context) (err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

return nil
}

func (s *Session) obtainMcToken(ctx context.Context) (err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be great

@cjmustard
Copy link
Contributor

can someone write up a list of what needs to still occur on this pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants