mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
* 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>
29 lines
827 B
TypeScript
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;
|
|
}
|