Skip to content

extractOAuthParams()

@blobs/sdk v0.1.0


@blobs/sdk / utils/oauthHelpers / extractOAuthParams

extractOAuthParams(url?): object

Defined in: utils/oauthHelpers.ts:310

Extract the OAuth-related query parameters from a URL.

Useful inside the callback page to read the state, code, and any error/error_description returned by the provider.

Parameters

url?

string

URL to parse; defaults to window.location.search.

Returns

object

The relevant params (each may be undefined if absent).

state?

optional state?: string

code?

optional code?: string

error?

optional error?: string

error_description?

optional error_description?: string