eslint: add lint enforcing camelCase
snake_case is needed in one place in the codebase to format URL arguments. Co-authored-by: Calvin Lee <pounce@integraldoma.in> Co-committed-by: Calvin Lee <pounce@integraldoma.in>
This commit is contained in:
parent
513cf825a5
commit
5146b0cad8
2 changed files with 7 additions and 6 deletions
|
@ -43,9 +43,9 @@ export function redirectAuthorize({ serverMetadata, clientId, redirectUri, scope
|
|||
// TODO: use the state param to prevent cross-site request
|
||||
// forgery
|
||||
let params = {
|
||||
response_type: "code",
|
||||
client_id: clientId,
|
||||
redirect_uri: redirectUri,
|
||||
"response_type": "code",
|
||||
"client_id": clientId,
|
||||
"redirect_uri": redirectUri,
|
||||
};
|
||||
if (scope) {
|
||||
params.scope = scope;
|
||||
|
@ -66,12 +66,12 @@ function buildPostHeaders(clientId, clientSecret) {
|
|||
|
||||
export async function exchangeCode({ serverMetadata, redirectUri, code, clientId, clientSecret }) {
|
||||
let data = {
|
||||
grant_type: "authorization_code",
|
||||
"grant_type": "authorization_code",
|
||||
code,
|
||||
redirect_uri: redirectUri,
|
||||
"redirect_uri": redirectUri,
|
||||
};
|
||||
if (!clientSecret) {
|
||||
data.client_id = clientId;
|
||||
data["client_id"] = clientId;
|
||||
}
|
||||
|
||||
let resp = await fetch(serverMetadata.token_endpoint, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue