Problems with authentication after register

Hello! I have a problem with my user registry that i can’t seem to find the right way of solving, I am using an action:

exports.onExecutePostLogin = async (event, api) => {

  if(event.stats.logins_count <= 1){

exports.onContinuePostLogin = async (event, api) => {

my code for the state.
I’m just passing the part of the state. that is not all

  const searchParams = new URLSearchParams(
  const state = searchParams.get('state')
  const [ continueUrl ] = useState(`${state}`)

window.location.href = continueUrl;

The problem is that my user once is already registered. In your first login (the one that comes by default after registering) you cannot perform any action as an authenticated user. In order to perform these actions I must log out and in again.

When using useAuth0 {isAuthenticated} it seems that I indeed AM authenticated. The problem is when I want to perform one of my fetchs to retrieve the information.

export default function ListaAlumnos() {
  const { getAccessTokenSilently } = useAuth0();
  const [alumnos, setAlumnos] = useState([]); 

  useEffect(() => {
    const fetchAlumnos = async () => {
      try {
        const token = await getAccessTokenSilently({
          audience: "localhost:8080/seguridad",
        console.log("token " + token);

        const response = await fetch("http://localhost:8080/alumno", {
          headers: {
            Authorization: `Bearer ${token}`,
        const data = await response.json();
      } catch (error) {

  }, [getAccessTokenSilently]);

  return (
      <h1>Aquí estará la lista de alumnos</h1>
      { => (
        <div key={}>{alumno.nombre}</div>

this is my function, when I enter here with my first login, I get the error alert

the problem is getAccessTokenSilently. in my console it appears: Eor: External interaction required.
Any help is appreciated!!