mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Correctly decode URI component when obtaining token.
Prevents redirect_uri mismatch by normalizing URL encoding
This commit is contained in:
parent
9dc143060f
commit
7f8ade5fc1
|
|
@ -112,7 +112,10 @@ export default apiRoute((app) =>
|
|||
where: (token, { eq, and }) =>
|
||||
and(
|
||||
eq(token.code, code),
|
||||
eq(token.redirectUri, redirect_uri),
|
||||
eq(
|
||||
token.redirectUri,
|
||||
decodeURIComponent(redirect_uri),
|
||||
),
|
||||
eq(token.clientId, client_id),
|
||||
),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue