ImplicitGrantFlow force opens browser window #41

Closed
opened 2024-05-02 14:59:06 +02:00 by timbeaudet · 2 comments
timbeaudet commented 2024-05-02 14:59:06 +02:00 (Migrated from github.com)

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.

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 commented 2024-05-07 12:47:37 +02:00 (Migrated from github.com)

Hello, check out my other example project for how to handle this: e7ce78a356/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.

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 commented 2024-05-15 13:12:50 +02:00 (Migrated from github.com)

Thanks, with that info I did get things working.

Thanks, with that info I did get things working.
Sign in to join this conversation.
No description provided.