Skip to content

WebGL support #11

@mvriel

Description

@mvriel

While reviewing this package for a project that uses WebGL; I found that it works splendidly on Desktop, but when in WebGL it won't work.

After some digging, I found two main culprits: HTTPListener and HTTPClient.

HTTPListener won't work; but I managed to find a way around that by opening a popup with the authorization screen, and sending a message back to the Unity client when it returns. This was inspired by https://developer.okta.com/blog/2021/02/26/unity-webgl-playfab-authorization.

The HTTPClient bit is a bit trickier; this is used in the AuthorizationCodeFlow and UserInfoParser. And at this point I am not sure whether it could be replaced by Unity's UnityWebRequest. It would mean a change in all Clients, as they are based on the AuthorizationCodeFlow.

Have you ever got this to work? Would UnityWebRequest be a viable alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions