issork / gift

Godot IRC For Twitch addon
MIT License
150 stars 23 forks source link

don't use multiline string for browser auth #23

Closed Yagich closed 1 year ago

Yagich commented 1 year ago

currently, if the user tries to authenticate with Gift.authenticate(), the browser will open a malformed URL and return a 404 because the URL string contains multiple lines and indentation:

    OS.shell_open("https://id.twitch.tv/oauth2/authorize
    ?response_type=code
    &client_id=" + client_id +
    "&redirect_uri=http://localhost:18297
    &scope=" + scope)

this PR fixes it by not using a multiline string. it's not the prettiest to be on one line, so if you'd like a better way to do it while keeping it free of tab characters and newlines i'm open to suggestions 🙂

issork commented 1 year ago

Thanks! ^^