admin 管理员组

文章数量: 1086019

I'm using import react-oidc-context to auth with my aws cognito. I'm trying to use the .signinPopup function but whenever the pop up opens I'm getting an error "Popup closed by user" although the pop up is open in my browser and I can see it.

I thought my wrapper was the issue so i isolated it and even this simple code doesn't work, as soon as the cognito pop up loads it says that it was closed.

import { useAuth } from "react-oidc-context";
......
const auth = useAuth();
.....

<button
                  onClick={async () => {
                    try {
                      await auth.signinPopup();
                    } catch {
                      return;
                    }
                  }}
                >
                  {" "}
                  hi
                </button>

本文标签: reactjsreact oidc context signinpopup always returns an error that the pop up was closedStack Overflow