Run prettier-fix
This commit is contained in:
parent
dd47b574b3
commit
8592cf2d07
1 changed files with 13 additions and 5 deletions
|
|
@ -97,14 +97,16 @@ export async function handleOAuthCallback(
|
|||
return data;
|
||||
}
|
||||
|
||||
export async function refreshAccessToken(serverUrl: string): Promise<OAuthTokens> {
|
||||
export async function refreshAccessToken(
|
||||
serverUrl: string,
|
||||
): Promise<OAuthTokens> {
|
||||
const refreshToken = sessionStorage.getItem(SESSION_KEYS.REFRESH_TOKEN);
|
||||
if (!refreshToken) {
|
||||
throw new Error("No refresh token available");
|
||||
}
|
||||
|
||||
const metadata = await discoverOAuthMetadata(serverUrl);
|
||||
|
||||
|
||||
const response = await fetch(metadata.token_endpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
|
@ -112,7 +114,7 @@ export async function refreshAccessToken(serverUrl: string): Promise<OAuthTokens
|
|||
},
|
||||
body: JSON.stringify({
|
||||
grant_type: "refresh_token",
|
||||
refresh_token: refreshToken
|
||||
refresh_token: refreshToken,
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue