Hey all -
I’m in the process of starting a new game project and stumbled onto Defold by chance (was originally planning on using a custom HTML5 solution). Since I have a soft spot for Lua, I figured I’d dig through the docs here and see if it would meet my requirements.
It seems it meets most of them… except one. I have the requirement to be able to log players in using an OAuth2 service… specifically, Twitch. Seeing as Defold does not allow for WebView on Desktop, I’m not sure if Defold would allow me to solve this problem.
I can’t make a simple HTTP request because I need to be able to load up a browser, the player will have to specifically allow permission to my game, and then the browser is redirected back to my app where I can get the auth token from the url (I’m sure most here know how OAuth works, haha). I don’t see how I can do this with Defold since 1) I can’t embed a WebView, and 2) I can’t read the return URL from a url I opened with sys.open (I believe that’s call).
Enough rambling – Is something like Twitch (or any other service) OAuth something that can be achieved with Defold? As I’ve said, I’m not seeing any solution… at least not out of the box. I assume I could always open a WebSocket connection to my server, open the browser or OAuth, redirect to my server, and then broadcast that token back to the game… that feels like a big workaround, though lol. I also know I could use a custom URL scheme but I understand that feature has been removed from later versions of OSX.
Any insight would be greatly appreciated. This seems like an engine I’d really enjoy (again, soft spot for Lua) but I wouldn’t be able to move forward without being able to solve this.