Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!params) { return {} }
let extracted = {}
let paramKeys = AUTH_QUERY_PARAMS
let value
for (let p of paramKeys) {
value = params[p]
// value = value === 'undefined' ? undefined : value
extracted[p] = value
}
// Special case because solid-auth-client does not include redirect in params
if (!extracted['redirect_uri'] && params.request) {
extracted['redirect_uri'] = IDToken.decode(params.request).payload.redirect_uri
}
return extracted
}