@trimble-oss/trimble-id-react
Version:
> **Important Notice:** > > As of version 1.0.0, `PersistentOptions` have been removed. By default, the SDK now supports in-memory token storage. > > When you upgrade to version 1.x, storage options will no longer be available, resulting in a breaking
32 lines (31 loc) • 783 B
TypeScript
import { TIDAuthState } from './state';
import { TIDUser } from '../TIDClient';
/**
* Actions available to manage the state of the TID Provider
*/
type Action = {
type: 'INIT';
user?: TIDUser;
} | {
type: 'LOGOUT';
} | {
type: 'GET_ACCESS_TOKEN_COMPLETE';
user?: TIDUser;
} | {
type: 'GET_TOKENS_COMPLETE';
user?: TIDUser;
} | {
type: 'HANDLE_CALLBACK_COMPLETE';
user?: TIDUser;
} | {
type: 'ERROR';
error: Error;
};
/**
* This function manage the state and logic of the TID Provider
* @param {TIDAuthState} state - Current state of the application
* @param {Action} action - Action to execute
* @return {TIDAuthState} Empty promise
*/
export declare const reducer: (state: TIDAuthState, action: Action) => TIDAuthState;
export {};