Local app login issues

Hey guys,

So I have a problem I am not sure how to solve, I first had.

I am currently adding a login to an app that is run locally from a program called Overwolf (http://www.overwolf.com) and I wanted to add a login functionality to it by using the JavaScript SDK.

So I got down to coding by following the documentation , I ran into a few problems but had finally gotten the basics of the logging in and authentication working! The only problem is now I have got an issue where it allows me to login and authorize the app but as soon as I click authorise it just gives me a blank screen and it should redirect me back to the uri I specified in the twitch app which is localhost - everything is correct in the code as I checked it with some other code people have posted around.

I ran into this post Twitch.TV JS SDK not retaining session grant? - #2 by Jaxel - API - Twitch Developer Forums
and the OP stated that

Okay… I’ve figured out the issue… BOTH URLs have to have the JS
SDK initiliazed on it.

I did not have the JS SDK on [link]

and so here is where my problem lies…

On the settings app , where the login is , I have the SDK loading perfectly fine and it is initialized but because my "redirect uri is set to localhost but I wanted to know how I can redirect it back to the index page? or possible back to the settings page? I’ve tried things like localhost/index.html but I don’t think I am doing it right :smiley:

Basically I’m a noob and need help thanks a lot :L

You need to have a locally hosted server that serves on localhost.

So I cannot do it if the webpage is hosted from my computer so whenever someone downloads the app if ant get it to redirect back to their specific app? Just because this is going to be used for multiple people who download it, so possibly a better way to do it is host the app on a server? Thanks for the help

I don’t really know how Overwolf loads the pages, it might be possible to somehow direct it back to the page running in Overwolf.

hmm okay, How Overwolf does it is just how you would do it if you had a html file on your desktop and ran it - its just Overwolf runs it in a custom browser, I might just host it on a server and that should fix the problem if I make the app redirect to the server so nothing is locally run, thanks :slight_smile:

Just wondering if anyone else had any other ideas of how I can perform logins from an app that is purely just a web app locally on my drive

You could do something like running a JS on your page that returns the current URL in Overwolf to see how Overwolf loads the file, then try using that URL as the redirect URL.

I already tried that - I found out that the app runs in a whole new browser window and has a virtual directory and I found it says asset://nonexistant-localdir/index.html so maybe that won’t work?

Then the only thing I can think of is proxying it somehow through a hosted server.

Okay thanks, I might just have it hosted on a server instead and redirect to it but then again it will be slower