From ddae4f408a9f4bf36bd1db94348162ce1106ebcf Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 11 Jun 2024 13:40:09 -0500 Subject: [PATCH] Support OAuth OOB --- src/controllers/api/oauth.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/api/oauth.ts b/src/controllers/api/oauth.ts index 5837a5e..18e107b 100644 --- a/src/controllers/api/oauth.ts +++ b/src/controllers/api/oauth.ts @@ -209,6 +209,10 @@ const oauthAuthorizeController: AppController = async (c) => { relays: bunker.searchParams.getAll('relay'), }); + if (redirectUri === 'urn:ietf:wg:oauth:2.0:oob') { + return c.text(token); + } + const url = addCodeToRedirectUri(redirectUri, token); return c.redirect(url);