mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Use URL literal instead of strings
This commit is contained in:
parent
99fac323c8
commit
76d1ccc859
50 changed files with 343 additions and 256 deletions
|
|
@ -86,7 +86,9 @@ export default (plugin: PluginType): void => {
|
|||
{
|
||||
id: issuer.id,
|
||||
name: issuer.name,
|
||||
icon: proxyUrl(issuer.icon) ?? undefined,
|
||||
icon: issuer.icon
|
||||
? proxyUrl(new URL(issuer.icon))
|
||||
: undefined,
|
||||
},
|
||||
200,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,9 @@ export default (plugin: PluginType): void => {
|
|||
);
|
||||
}
|
||||
|
||||
const authServer = await oauthDiscoveryRequest(issuer.url);
|
||||
const authServer = await oauthDiscoveryRequest(
|
||||
new URL(issuer.url),
|
||||
);
|
||||
|
||||
const codeVerifier = generateRandomCodeVerifier();
|
||||
|
||||
|
|
@ -130,7 +132,7 @@ export default (plugin: PluginType): void => {
|
|||
crypto.getRandomValues(new Uint8Array(32)),
|
||||
).toString("base64"),
|
||||
name: "Versia",
|
||||
redirectUri,
|
||||
redirectUri: redirectUri.toString(),
|
||||
scopes: "openid profile email",
|
||||
secret: "",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue