Skip to content

validateOAuthState()

@blobs/sdk v0.1.0


@blobs/sdk / utils/oauthHelpers / validateOAuthState

validateOAuthState(state): boolean

Defined in: utils/oauthHelpers.ts:228

Check whether a state token from the callback matches the one saved at flow start. Use this on the callback page to mitigate CSRF.

Parameters

state

string

State value returned by the provider.

Returns

boolean

True when the state matches the persisted one.