whodis-react
Version:
React hooks and components for secure, best practices authentication in seconds
18 lines (17 loc) • 863 B
TypeScript
import { WhodisAuthTokenClaims } from 'whodis-client';
import { WhodisAuthTokenStorage } from '../../domain/WhodisAuthTokenStorage';
export declare const useAuthableTokenClaims: ({ storage, }: {
storage: WhodisAuthTokenStorage;
}) => {
/**
* the authable claims stored on the device
*
* note
* - when `undefined`, we do not know yet whether or not the user is signed in (haven't checked device storage yet)
* - when `null`, we know for sure that the user is not signed in
* - these are not authenticated claims
* - we don't check for authenticity here because you cant trust the user's device anyway
* - we only check that they're authenticatable, such that unless the user is purposely manipulating the token, it is guaranteed to be authentic
*/
claims: WhodisAuthTokenClaims | null | undefined;
};