mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
feat(#1003): closing stale 'authorize' windows | handling error, error_description, error_uri query params for oauth2 | clear authorize window cache for authorization_code oauth2 flow (#1719)
* feat(#1003): oauth2 support --------- Co-authored-by: lohit-1 <lohit@usebruno.com>
This commit is contained in:
@@ -51,6 +51,13 @@ router.get('/authorize', (req, res) => {
|
||||
|
||||
const redirectUrl = `${redirect_uri}?code=${authorization_code}`;
|
||||
|
||||
try {
|
||||
// validating redirect URL
|
||||
const url = new URL(redirectUrl);
|
||||
} catch (err) {
|
||||
return res.status(401).json({ error: 'Invalid redirect URI' });
|
||||
}
|
||||
|
||||
const _res = `
|
||||
<html>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user