Skip to content

Commit

Permalink
fix: remove unnecessary async in get tokens functions
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogrodzki committed Nov 6, 2024
1 parent 5fef799 commit c0f530c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/next/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export function validateOptions(options: GetTokensOptions) {
}
}

export async function getRequestCookiesTokens(
export function getRequestCookiesTokens(
cookies: RequestCookies | ReadonlyRequestCookies,
options: GetCookiesTokensOptions
): Promise<ParsedTokens> {
const parser = CookieParserFactory.fromRequestCookies(cookies, options);

return await parser.parseCookies();
return parser.parseCookies();
}

function toTokens(result: VerifiedTokens | null): Tokens | null {
Expand Down Expand Up @@ -161,13 +161,13 @@ export async function getTokens(
}
}

export async function getCookiesTokens(
export function getCookiesTokens(
cookies: CookiesObject,
options: GetCookiesTokensOptions
): Promise<ParsedTokens> {
const parser = CookieParserFactory.fromObject(cookies, options);

return await parser.parseCookies();
return parser.parseCookies();
}

export async function getApiRequestTokens(
Expand Down

0 comments on commit c0f530c

Please sign in to comment.