Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Help needed implementing OAuth flow callback with Unity WebGL game

A topic by hoochgut created Jan 22, 2023 Views: 224
Viewing posts 1 to 1
(2 edits)

I have a WebGL game that I'm developing with Unity and would like to implement the Itch OAuth flow.  Ideally, I'd like it to be seamless from the user's perspective and use their itch account profile for other backend game uses (PlayFab for instance).

From reading, it seems that I won't be able to use the environment variable to get the API Key directly, so I believe I have to use the OAuth flow - which will pop up a SPA to let the user agree to allow my game profile access.  Seems like a basic question, but in the application settings, what would I use as the callback URL?  I added a callback.html to the top level (alongside index.html), so I just setup the callback URL as <my profile>.itch.io/<game name>/callback.html.  

But once the SPA authorized, I get a 404, file not found.  Is there another place that this callback file should be located or a different base URL needed for this to work?

Thanks in advance for any help!

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.