Skip to content

Instantly share code, notes, and snippets.

@ulises-jeremias
ulises-jeremias / auth-hook.js
Last active June 10, 2024 15:40
Examples of hooks utils using axios, recoil.js, keycloak-js, @react-keycloak/web and more.
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { useKeycloak } from '@react-keycloak/web';
import { commonNotification } from './common';
/**
* Returns the auth info and some auth strategies.
*
*/