Skip to content

Commit 2a28cee

Browse files
committed
impl: handle the redirect URI
Toolbox can handle automatically the exchange of an authorization code with a token by handling the custom URI for oauth. This commit calls the necessary API in the Coder Toolbox URI handling.
1 parent d432a76 commit 2a28cee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,12 @@ class CoderRemoteProvider(
318318
*/
319319
override suspend fun handleUri(uri: URI) {
320320
try {
321+
322+
if (context.oauthManager.canHandle(uri)) {
323+
context.oauthManager.handle(uri)
324+
return
325+
}
326+
321327
linkHandler.handle(
322328
uri,
323329
shouldDoAutoSetup()

0 commit comments

Comments
 (0)