A react hook that will return authentication and authorization info.
roleName : string?
Optional
Trixta role name
isAuthenticated : boolean
Will be true
if the Trixta space connected with token parameter.
hasRole : boolean
Will be true
if the passed roleName
for the current user has access.
hasAccess : boolean
Will be true
if the hasRole
and isAuthenticated
mentioned above is true
.
isAuthorizing : boolean
Will be true
if Trixta is still authorizing the above mentioned roleName