使用 Apple 按钮登录网站上未出现

时间:2021-06-17 03:19:26

标签: apple-sign-in

在其自己的网页上仅运行以下代码(除假数据外)时,我可以让“使用 Apple 登录”按钮正常显示和工作。

for {
    post <- Posts
    clickCount <- Clicks
        .leftJoin(_.postId == post.id)
        .filter(_ => post.authorId == lift(userId) && !post.isDeleted)
        .groupBy(_ => post.id)
        .map {
            case (_, rows) =>
                ClickCount(
                    post.id,
                    post.title,
                    rows.map { maybeClick =>
                        maybeClick.map(_.id)
                    }.size
                )
        }
} yield clickCount

但是,如果我将上面的代码块复制并粘贴到我的实际登录页面中,按钮可以正常工作并且逻辑可以工作,但是按钮图像没有显示 - 这是我看到的:

SIWA button

网站上的其他图片显示正常。

这是显示在现场网站上的元素代码(我已经缩短了图像的 base64 代码以便在此处显示):

        <script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
    <div id="appleid-signin" data-color="black" data-border="true" data-type="sign in"></div>
    <script type="text/javascript">
        AppleID.auth.init({
            clientId : 'com.google.google',
            scope : 'name email',
            redirectURI : 'https://www.google.com/index.php',
            state : 'blah',
            nonce : '[NONCE]',
            usePopup : false //or false defaults to false
        });
    </script>

我猜这是我的 css 中某个地方的问题,但我不知道要查找什么。知道什么会干扰 Apple 代码吗?

谢谢

0 个答案:

没有答案
相关问题