Saltearse al contenido

oAuthUtils

Esta página aún no está disponible en tu idioma.

Defined in: studiocms/packages/studiocms/src/oAuthUtils.ts:12^

Error class representing a failure during the validation of an authentication code.

  • any

new ValidateAuthCodeError(): ValidateAuthCodeError

ValidateAuthCodeError

Data.TaggedError('ValidateAuthCodeError')<{
message: string;
provider: string;
}>.constructor

function getCookie(context: APIContext, key: string): any

Defined in: studiocms/packages/studiocms/src/oAuthUtils.ts:40^

Retrieves the value of a cookie from the provided API context using the specified key.

Wraps the retrieval in an Effect, returning the cookie value if found, or null if not present. Throws an AstroError if there is a failure during the cookie retrieval process.

APIContext

The API context containing the cookies object.

string

The name of the cookie to retrieve.

any

An Effect that resolves to the cookie value as a string, or null if not found.


function getUrlParam(context: APIContext, name: string): any

Defined in: studiocms/packages/studiocms/src/oAuthUtils.ts:24^

Retrieves the value of a specified query parameter from the given API context’s URL.

APIContext

The API context containing the URL to extract the parameter from.

string

The name of the query parameter to retrieve.

any

An Effect that resolves to the value of the query parameter, or throws an AstroError if parsing fails.