我使用的是https://github.com/auth0-samples/auth0-ionic-samples/tree/main/angular,并按照自述文件中的示例进行操作
允许的回调URL:com.auth0.samples://XXXX/capacitor/com.auth0.samples/callback, capacitor://localhost, http://localhost, http://localhost:4200
允许的注销URL:com.auth0.samples://XXXXX/capacitor/com.auth0.samples/callback, http://localhost:4200
允许的原点(CORS):capacitor://localhost, http://localhost
允许的网站来源:http://localhost:4200
它工作了两次,然后所有进一步的测试我收到这个错误
无法启动“”,因为该方案没有注册的处理程序。“”
使用ts
export class ProfileComponent implements OnInit {
user$ = this.auth.isAuthenticated$.pipe(switchMap(() => this.auth.user$));
constructor(public auth: AuthService) { }
超文本标记语言
<div *ngIf="user$ | async as user" class="profile-container">
<ion-avatar class="avatar">
<img [src]="user.picture" [alt]="user.name" />
</ion-avatar>
<h2>name {{ user.name }}</h2>
<p> email {{ user.email }}</p>
</div>
1条答案
按热度按时间vdgimpew1#
https://github.com/auth0-samples/auth0-ionic-samples/tree/main/angular上的演示已经更新,现在在iOS和Android上运行良好。请注意
ionic serve -p 4200
可能会运行一次,但仍然会给出错误:无法启动"",因为该方案没有注册的处理程序。""