Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static getGithubAccessToken(state, code) {
return funtch
.url(
`${getAuthApiUrl()}/login/github?state=${encodeURIComponent(
state,
)}&code=${encodeURIComponent(code)}`,
)
.error(customError)
.get();
}
export function auth(url, authentification = localStorage.getItem(STORAGE_KEY_AUTH)) {
if (!authentification) {
const authError = new Error('Authentification not find');
authError.noAuth = true;
throw authError;
}
return funtch.url(url).error(customError).auth(authentification);
}
export function auth(url, authentification = localStorage.getItem(STORAGE_KEY_AUTH)) {
if (!authentification) {
const authError = new Error('Authentification not find');
authError.noAuth = true;
throw authError;
}
return funtch
.url(url)
.error(customError)
.auth(authentification);
}