[英]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.