fp/services/next/app/profile/hooks/keycloakGroup.ts

11 lines
275 B
TypeScript

import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { JWT } from 'next-auth/jwt'
const fetchKeycloakGroup = async (): Promise<JWT> => {
const response = await fetch(`/api/auth/renew`)
const data = await response.json()
return data
}