Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImplicitGrantFlow force opens browser window #41

Open
timbeaudet opened this issue May 2, 2024 · 2 comments
Open

ImplicitGrantFlow force opens browser window #41

timbeaudet opened this issue May 2, 2024 · 2 comments

Comments

@timbeaudet
Copy link

In the Example (and from what I can see there is no way to solve this) the ImplicitGranFlow login will always pop open a default browser window for the user to authenticate with Twitch. I'd love to save the access token, refresh token and any other information in order to reload it after the initial page confirmation.

If I'm missing something basic, perhaps the Example, or some other place could make this more clear.

Expected: Only open the browser when access & refresh token is invalid, otherwise just use the prior tokens.

@issork
Copy link
Owner

issork commented May 7, 2024

Hello, check out my other example project for how to handle this: https://github.com/issork/twitch-overlay/blob/e7ce78a356cfdd10eccdb01ddb5642482128ecd0/TwitchOverlay.gd#L24

It probably is also a good idea to add it to the default repository here, so I'll do just that.

The TwitchIDConnection has a builtin validity check for the passed in token - so instantiate a new token using the constructor from the data you saved and pass it in, the TwitchIDConnection will handle the rest.

@timbeaudet
Copy link
Author

Thanks, with that info I did get things working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants