簡體   English   中英

Angular:firebase托管的網站登錄失敗

[英]Angular: the website hosted on firebase fail to log in

我在 firebase 上托管了一個網站,登錄方法在本地主機上運行良好。 但是,在托管網站上,登錄名 window 只是閃爍了一秒鍾,無法登錄: https://angular-example-gg.web.app/

這是我的代碼:

<mat-toolbar color="primary">     #navbar
<mat-toolbar-row>
    <span routerLink="/recommand">SPACE</span>
    <span class="spacer"></span>
    <div *ngIf="auth.afAuth.authState | async as user; else showLogin">
        <button mat-raised-button color="accent" routerLink="/dashboard">Write a Post</button>
        <button mat-button (click)="auth.logout()">Logout</button>
    </div>
    <ng-template #showLogin>
        <button mat-button (click)="auth.login()">Login with Google</button>
    </ng-template>
</mat-toolbar-row>

<div id="bg">      #body
<div *ngIf="auth.afAuth.authState | async as user; else showLogin">
    ...
<ng-template #showLogin>
    <div class="animation">Here, build your own space ...</div>
    <button mat-raised-button id="tin" (click)="auth.login()" color="primary">Try it now</button>
</ng-template>
</div>

我不確定這個問題的原因是因為我的代碼還是我的托管過程?

親愛的朋友,你的 api 谷歌密鑰無效,請在你點擊 API 時檢查錯誤

"{"error":{"code":400,"message":"API key not valid. Please pass a valid API key.","errors":[{"message":"API key not valid. Please pass a valid API key.","domain":"global","reason":"badRequest"}],"status":"INVALID_ARGUMENT"}}"

謝謝..

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM