DefinitelyTyped/types/react-auth-kit/types.d.ts
Arkadip Bhattacharya 57e71410df
feat: Updated to 1.2 (#47631)
* feat: Updated to 1.2

Signed-off-by: Arkadip Bhattacharya <in2arkadipb13@gmail.com>

* del: unused files

Signed-off-by: Arkadip Bhattacharya <in2arkadipb13@gmail.com>

* del: depricated file

Signed-off-by: Arkadip Bhattacharya <in2arkadipb13@gmail.com>

* fix: Type changed

Signed-off-by: Arkadip Bhattacharya <in2arkadipb13@gmail.com>
2020-09-16 16:22:11 -07:00

29 lines
827 B
TypeScript

import * as React from "react";
export interface TokenInterface {
authToken: string | null;
authTokenType: string | null;
expireAt: Date | null;
authState: object | null;
}
export interface signInFunctionParams {
token: string;
tokenType: string | 'Bearer';
expiresIn: number;
authState: object;
}
export interface TokenObjectParamsInterface {
authStorageType: 'cookie' | 'localstorage';
authStorageName: string;
authTimeStorageName: string;
stateStorageName: string;
cookieDomain?: string;
cookieSecure?: boolean;
}
export interface AuthContextInterface {
authState: TokenInterface;
setAuthState: React.Dispatch<React.SetStateAction<TokenInterface>>;
}
export interface AuthProviderProps extends TokenObjectParamsInterface {
children: React.ReactChildren;
}