Support OAuth OOB

This commit is contained in:
Alex Gleason 2024-06-11 13:40:09 -05:00
parent e45ff80067
commit ddae4f408a
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 0 deletions

View File

@ -209,6 +209,10 @@ const oauthAuthorizeController: AppController = async (c) => {
relays: bunker.searchParams.getAll('relay'), relays: bunker.searchParams.getAll('relay'),
}); });
if (redirectUri === 'urn:ietf:wg:oauth:2.0:oob') {
return c.text(token);
}
const url = addCodeToRedirectUri(redirectUri, token); const url = addCodeToRedirectUri(redirectUri, token);
return c.redirect(url); return c.redirect(url);